how to use Enableviewstate property????

W

wpy

Hi,

I had built a composite control but I don't want to preserve control
state automatically. I set the enableviewstate property of every sub
control within the composite control to false. But it does not work,
controls still preserve the state automatically. How can I set the asp.net
control that they are not to preserve state automatically. Can anyone show
me the right way to do it..thanks
 
N

Natty Gur

Hi,

Setting enableViewState should work for controls that use Viewstate to
preserve their own state data (grid, label ...).if your sub controls are
eventually (on browser) INPUT tags. their value will be transfer
automatically via Form in any request sent to server.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
A

Andy Z Smith

I think that the parent control (the Page object) will track viewstate for subcontrols. Try investigating that angle (that the EnableViewState trickles down).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,890
Messages
2,569,972
Members
46,308
Latest member
DonaldDarr

Latest Threads

Top