I have set HiddenField value from jQuery and i want to use this HiddenField value in page_init event, but each time i get blank value. what would be the issue.
$('#hfKitchenID').val(kitchenid);
protected void Page_Init(object sender, EventArgs e)
{
string value = hfKitchenID.Value;
}
You cannot get the value of the hidden field on
Page_initbecause the value of the hidden field is save inViewState, andViewStateis not accessible onPage_Init.In the page life cycle the
LoadViewStateEvent occurs just after theInitEvent.