hi.
suppose you save data into a dynamic hidden field ,which is created dynamically during the handling of some postback event.
what is the best way to retrieve it from this field upon a postback, (besides searching the request for the key of this hidden field and then retrieving the corresponding value as in the code below)?
protected void Button2_Click(object sender, EventArgs e)
{
bool found = false;
for (int i=0; i<this.Request.Form.Keys.Count; i++)
{
string item = this.Request.Form.Keys[i];
if ( item=="Hidden1")
{
Literal6.Text = Request.Form.GetValues(i)[0];
found = true;
}
}
if (found==false)
{
Literal6.Text = "Hidden1 is not found";
}
}