Can the HTML controls retain State across postbacks? If no, can you make HTML controls retain State across postbacks?

 Posted by Tripati_tutu on 11/12/2010 | Category: ASP.NET Interview questions | Views: 3271 | Points: 40

No, by default the HTML controls doesn't retain any state across postbacks. But yes, if you are converting HTML controls to Server Controls then you can retain HTML control State across postbacks.

There are 2 ways to convert HTML control to Server Control.
• Right click on the HTML Control and then click "Run As Server Control"
• Set runat="server" attribute for the Control.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response