Monday, April 30, 2007

EventHandling and Delegates

I found a few good links on eventhandling and delegates:

http://www.developerfusion.co.uk/show/2137/3/

WebSnapr - Website Thumbnails For Your Site

WebSnapr - Website Thumbnails For Your Site

Useful tool for taking snapshots of a website. Check it out.

Saturday, April 28, 2007

Understanding ASP.NET View State

Understanding ASP.NET View State

I did not have a good understanding about ViewState until, I read the above article. It was other thing that I did not get a chance to use ViewState.
I always thought that viewstate restores the textbox, checkbox and other server controls(which implement IPostBackHandlerInterface) values across postback.
But actually, the LoadPostData event restores the values of the controls across PostBacks. ViewState is used to persist changed information across postbacks.
For ex:
A page contains three controls :
label - text= "Message",
button -text/id="ChangeMessage"
button -text/id="NoChange".

The ChangeMessage button changes the value of the label in its click event to "NewMessage".
The NoChange button does not do anything.

With ViewState Enabled, if you click the ChangeMessage button and then NoChange button, the label will be displaying NewMessage.
But with ViewState disabled, you will see that the label will be just Message instead of NewMessage.

The ASP.NET HTTP Runtime

The ASP.NET HTTP Runtime

An excellent article if you want to know the internals of ASP.NET and IIS. This article answers the following questions:

How are requests passed from IIS to the worker process?
What happens after the worker process takes over the request?
What happens on the file system when a request is made?

This is one of the few articles which gives a complete life cycle of a request. Hats off to Dino Esposito for writing a great article.

Thursday, April 26, 2007

The Dilbert Blog: Outsource the Government

The Dilbert Blog: Outsource the Government

Couldnt stop laughing....Check it out.

Wednesday, April 25, 2007

AppPool recycle

Instead of restarting the IIS using IISReset, which would recycle all the AppPools on the server, you can just recycle the required AppPool using the following command:

%windir%\system32\cscript.exe c:\windows\system32\iisapp.vbs /a "[App Pool Name]" /r

You can create a shortcut for the above and add it to your toolbar