I have the following code :
protected void Page_Load(object sender, EventArgs e)
{
  string runat = "runat=\"server\"";    
}
protected void Page_PreRender(object sender, EventArgs e)
{       
//some code       
}
<iframe <%=runat%>></iframe>
I need to be sure the code within Page_PreRender executes only when the variable runat has been initialized & the iframe control is ready for rendering.
Unfortunately it does not work. I also tried Page_PreRenderComplete and it does not work.
Does anyone have an idea to fix this problem ? Thanks!