The problem is that in asp.net 2.0, Microsoft has decided not to store
hidden columns in viewstate for security reasons. That is, say you put
payroll data in a table and made the column hidden for non-hr people. Us
developer types could look at viewstate and get it.
The workaround is to add to the gridview attribute
datakeynames=[myhiddendatavalue,...] and this will force the hidden column
back into viewstate. There are also issues around encrypting viewstate and
performance you should keep in mind also.
Peter Kellner
http://peterkellner.net
"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> wrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
Hi,
See the following:
http://www.devnewsgroups.net/group/m...opic38190.aspx
This was a particularly useful feature of the old DataGrid control which
seems to be missing from the new GridView control
What is the "preferred" method of doing this in a GridView?
Any assistance gratefully received.
Mark