Thursday, March 7, 2013

SelectMethod in ASP.NET 4.5 Model binding

New version of ASP.NET provides lots of way of binding data to the data controls like Grid View, Repeater etc. You can now bind this controls with strong type. I have earlier written a blog post about How we can use Model binding with ASP.NET 4.5 and Visual Studio 2012.

SelectMethod in ASP.NET 4.5:


In asp.net 4.5, It is also possible to bind controls with SelectMethod attribute. This method specify the data that you want to bind with data controls like grid view and repeater controls.

So what we are waiting for?? Let’s take an simple example. I have create a basic model class “Employee” like below.
public class Employee
{
    public int EmployeeId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
}
This class contains three properties EmployeeId,FirstName and LastName. Now I have created one method to get a generic list of employee model like following.
Share:
Wednesday, March 6, 2013

Telerik JustCode review

Visual Studio is a great IDE and  allow developers to design and code anything from windows application to web application. But it does not have a much code refactoring features so You need to have third party add in to make this happen. Telerik JustCode is one of them.

Recently I was contacted by Telerik team to review Telerik JustCode. So I installed Telerik Just code in my machine and I have used it for few days and Here is the my first impressions.

Things that I like about Telerik JustCode:

  1. It does not have impact on the Visual Studio load time.
  2. It does not change any theme or UI for the Visual Studio.
  3. Performance is much better then it’s competitors. It does not slow down visual studio while you were using it.
  4. Its not overwriting all things in Visual Studio like visual studio shortcuts.
  5. Another things its competitively priced then its competitors.
  6. Cloud Sync of your settings so you don’t have to worry about loosing your settings.
  7. Almost got all the features of code refactoring and code creation which are available with tools.
  8. Does not have annoying popups for suggestions or code refactoring.
Share:

Tip- InProc session state was not working with IIS7.5

In this post I am going to explain about reason for InProcsessionState was not working with IIS 7.5.

Problem:

Yesterday in one of my PC I got updated IIS 7.5 and suddenly after updating the IIS my ASP.NET application session state stopped working. It was a very weird behaviour and after doing some R and D I have found that my worker process per application was more then one.

That was the reason for the  session state was not working as “InProc” session state is using IIS memory to manage sessions.  You can find more information about this in following link.

http://stackoverflow.com/questions/2147578/asp-net-session-state-and-multiple-worker-processes

Resolution:

There are two ways of resolving this problem.

1) You can use other session state mode like State Server or SQL server which supports multiple worker processes.
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews