Is there a way to retrieve the value of a dynamically created control before the page loads in ASP.NET using C#?
protected void Page_PreInit(object sender, EventArgs e)
{
int i = 0;
//createDynamicControl(i);
var elems = Request.Form.AllKeys.Where(key => key.Contains("lb_")).ToList();
foreach (string key in elems)
{
this.createDynamicControl(i);
i++;
}
}
I've tried implementing this code but it doesn't seem to work for me.
Best regards, Vivek