Question on viewstate workaround technique

V

vMike

I have a Datalist which contains linkbuttons. In order to get the
information about the clicked linkbutton I have been enabling the viewstate.
I have noticed that the size of the viewstate for datalists is quite large
(about 8000 character) even though the datalist ranges about 20 items long.
As a workaround I have thought about but haven't actually tried is to
disable the viewstate, then use the Request.Form("__EVENTARGET") and use the
control ID to determine which control has been click and process from there.
I also forgo getting any command arguments etc. The trade off here is page
bloat. What do you think of that method? Are there other ways to do this?
Thanks for any insight.

Mike
 
G

Guest

why can't you switch off the viewstate, and put a bit of ye olde client
script on the control in question, this can still call back to the server
side page?

i've had to use something like this to detect when someone presses 'enter'
 
V

vMike

adolf garlic said:
why can't you switch off the viewstate, and put a bit of ye olde client
script on the control in question, this can still call back to the server
side page?

i've had to use something like this to detect when someone presses 'enter'
Thanks. Sometimes the simple things escape me.
 

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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top