Reputation: 349
In my page_load I am creating a
HiddenField newField= new HiddenField();
and then I am assigning newField.ID = "someid"
and Value="0"
to it. on a partial postback (triggered by an UpdatePanel) i am then checking
Request.Form["someid"]
in the panel_Load event during the postback. but the request returns null as someid wasn't posted back. (not contained in the Request.Form collection) Why could this be?
Thanks
Upvotes: 3
Views: 866
Reputation: 25684
ASP.NET mangles the ID when rendered to the client by default. To access it from the Form collection, try this:
Request.Form[newField.ClientID]
Upvotes: 3