Thursday, September 10, 2009
RESTful Services With ASP.NET MVC
http://msdn.microsoft.com/en-us/magazine/dd943053.aspx
Wednesday, September 9, 2009
?? Operator (null-coalescing operator)
A nullable type can contain a value, or it can be undefined. The ?? operator defines the default value to be returned when a nullable type is assigned to a non-nullable type. If you try to assign a nullable value type to a non-nullable value type without using the ?? operator, you will generate a compile-time error. If you use a cast, and the nullable value type is currently undefined, an InvalidOperationException exception will be thrown.
Monday, September 7, 2009
SSRS 2005 limitations :
I am working with SSRS 2005 since last 8 months and i came across many limitations which should not be there with SSRS . SSRS is still getting matured so please go through following list before choosing SSRS 2005 for reporting in your system.
Does not support dynamic width for columns:
SSRS doesn’t support dynamic width for columns , also the main problem I found is if you will disable one column based on condition then remaining columns width won’t get adjusted to use hidden columns space. And its very frustrating.
Doesn’t support HTML rendering !!!!!!!!!:
Yes, Its correct that SSRS 2005 doesn’t support HTML rendering of sent data. It is really surprising for me.
CanGrow property :
SSRS controls have cangrow property, if its true then controls will grow based on its contents width. But its can grow in vertical direction but not in horizontal.....
If this property is set to false then it will auto trim data based on controls width. and then if you want to show “...” to show there are some more data then you are in real trouble.
There are some more limitations are mentioned at here.
Hope all this problems are solved with SSRS 2008....:)
Thursday, September 3, 2009
Some nice MVC videos
Choosing between ASP.NET Web Forms and MVC
http://videos.visitmix.com/MIX09/T23F
ASP.NET MVC: America's Next Top Model View Controller Framework
http://videos.visitmix.com/MIX09/T50F
Microsoft ASP.NET Model View Controller (MVC): Ninja on Fire Black Belt Tips
http://videos.visitmix.com/MIX09/T44F
Friday, March 27, 2009
Something about MVC (Model View Controller)!!!
Basically MVC is a design pattern defined many years back and ASP.NET MVC Framework is the framework to implement MVC pattern.
As Per wordPress the defination of MVC Pattern is
“Model–View–Controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic fromuser interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model.”
Now lets understand MVC Framework.
MVC is a framework methodology that divides an application’s implementation into three component roles: models, views, and controllers.
· “Models” in a MVC based application are the components of the application that are responsible for maintaining state. Often this state is persisted inside a database (for example: we might have a Product class that is used to represent order data from the Products table inside SQL).
· “Views” in a MVC based application are the components responsible for displaying the application’s user interface. Typically this UI is created off of the model data (for example: we might create an Product “Edit” view that surfaces textboxes, dropdowns and checkboxes based on the current state of a Product object).
· “Controllers” in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information - it is the controller that handles and responds to user input and interaction.
One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. Maintaining a clean separation of concerns makes the testing of applications much easier, since the contract between different application components are more clearly defined and articulated.
The MVC pattern can also help enable red/green test driven development (TDD) - where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself.

Some benefits of MVC are :
Clear separation of concerns
Testability - support for Test-Driven Development
Fine-grained control over HTML and JavaScript
Intuitive URLs
I will try to post more and more things about MVC.
Friday, June 27, 2008
Visual Studio 2008 and .NET Framework 3.5 SP1 Available Now
The public beta of Visual Studio 2008 and .NET Framework 3.5 SP1 are now available here.
SP1 comes with a slew of enhancements and fixes covering various aspects of the VS 2008 IDE as well as the .NET Framework.
Among the highlights relevant to ASP.NET and web development in the upcoming SP1 release include:
- ASP.NET Data Scaffolding Support (ASP.NET Dynamic Data)
- ASP.NET Routing Engine (System.Web.Routing)
- ASP.NET AJAX Back/Forward Button History Support
- ASP.NET AJAX Script Combining Support
- VS 2008 Performance Improvements in HTML Designer and HTML Source Editor
- VS 2008 JavaScript Script Formatting and Code Preferences
- Better VS Javascript Intellisense for Multiple Javascript/AJAX Frameworks
- VS Refactoring Support for WCF Services in ASP.NET Projects
- VS Support for Classic ASP Intellisense and Debugging
- Visual Web Developer Express Edition support for Class Library and Web Application Projects
- ASP.NET Application Request Throughput Improvements of Up to 10%
- SQL 2008 Support in VS 2008
- ADO.NET Entity Framework and LINQ to Entities
- ADO.NET Data Services
- WCF Development Improvements
- VB and C# Improvements
Other enhancements not mentioned above cover primarily client development (Windows Forms, WPF, and Setup Package). The SP1 releases are expected to be shipped this summer as free updates.
For a more detailed description of the new features in the release, check out Scott Guthrie's blog post or Somasegar's blog post.Thursday, June 5, 2008
Passing a Variable Number of Arguments to a Method
If you need to pass an unknown number of arguments to a method, the params keyword is exactly what you need. With params, you can pass a variable number of parameters to a method and any parameters after the fixed parameters will be collected into an array and passed to your method. You can only use the params keyword for one parameter in your method declaration and it must always be the last parameter. A method that accepts a string and then a variable number of parameters of any type looks like this:
public void ObjectParams(string Message, params object[] p)
{
Console.WriteLine(Message);
for (int i = 0; i < p.Length; i++)
{
Console.WriteLine(p[i]);
}
}
This method prints the string parameter to the console then loops through variable parameters, printing each one to the console as well. It accepts an array of objects, so the parameters can be any data type. You would call the function like this:
ObjectParams("Variable Object Parameters", 12, 'z', "Test");If you know the data type of your arguments, you can optimize this somewhat by specifying a type other than object for the variable parameters. A method that expects a variable number of integers would look like this:
public void IntParams(string Message, params int[] p)
{
Console.WriteLine(Message);
for (int i = 0; i < p.Length; i++)
{
Console.WriteLine(p[i]);
}
}
You call this method the same way as before, only passing integers.
IntParams("Variable Integer Parameters", 1, 2, 3, 4, 5);You also can pass an array as the last parameter instead of passing individual parameters. The previous method, which accepts integers, also could be called this way.
int[] TestIntArray = new int[5] { 11, 12, 13, 14, 15 };
IntParams("Integer Array Parameter", TestIntArray);
The ability for a method to accept a variable number of parameters can come in handy in many situations. Now, with the params keyword, you have what you need to take advantage of this ability in C#.
