Neither of these statements will properly render a control. The control,
flat out , is not there, when the form rendering has completed. Is there a
trick to get this to work, or am I flat out of luck?
Response.Write(" <asp:image id=""img1"" runat=""server"" Height=""25""
Width=""26"" ImageUrl=""" + image + """></asp:image>")
Response.Write("<asp:HyperLink id=""HyperLink1"" runat=""server"">Mail
History</asp:HyperLink>")
The reason I am doing this is becuase I've got one of these going on
<% for i = 0 to whatever%>
<table
'bunch of junk goes here
</table>
bryce_db - 25 Jun 2005 07:30 GMT
If you're willing to use code behind to instantiate controls, you can declare
webcontrols (or the literal - which allows you to manually insert any valid
html) as noted below..
On the .aspx page:
<asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>
In the code-behind page:
protected System.Web.UI.WebControls.PlaceHolder PlaceHolder1;
private void Page_Load(object sender, System.EventArgs e)
{
for(int i=0; i<6; i++)
{
HyperLink hlnk = new HyperLink();
hlnk.NavigateUrl = "http://www.msn.com";
hlnk.Text = "msn" + i;
LiteralControl ltrBR = new LiteralControl("<hr>");
PlaceHolder1.Controls.Add(hlnk);
PlaceHolder1.Controls.Add(ltrBR);
}
}
> Neither of these statements will properly render a control. The control,
> flat out , is not there, when the form rendering has completed. Is there a
[quoted text clipped - 11 lines]
> 'bunch of junk goes here
> </table>