Q
Problem solve Get help with specific problems with your technologies, process and projects.

Auto-postback for HTML control is not working

I have a Web form with both HTML and ASP controls. While giving auto-postback, the values in ASP controls are getting persists, but the one in HTML control is not! Can you suggest a way to get it back?
HTML controls, by default, do not run on the server. That means they simply wrap HTML traditional functionality. Therefore, postback and viewstate are not available. To get them, you need to make those controls run on the server, which can be achieved by right-clicking the control and selecting Run as Server Control. After this action, you get a variable of the appropriate type declared in the code behind file, which means you can now even modify the control properties from server-side code, just like the Web Forms controls.
 

This was last published in January 2004

Dig Deeper on .NET Framework application performance management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close