Do we need to dispose the Server controls in the code behind file?

Posted by Raja under ASP.NET category on | Views : 4643
Do not dispose the web server controls in the .aspx.cs page (code behind) page otherwise you will get very unexpected behaviour and you will keep debugging for this unexpected behaviour but will not get any clue.

Not sure but this happens because of the web server control object is disposed before it is rendered to the page.

Comments or Responses

Login to post response