Dynamic Web Control Creation

R

Ryan Wade

If I put my control on the form in the designer it works
OK. But If I create it in using response.Write in the
pageload event it doesn't get created. Any thoughts?

this.Response.Write("<td>");
this.Response.Write("<uc1:EnterCase id=\"cEnterCase\"
runat=\"server\">");
this.Response.Write("</uc1:EnterCase>");
this.Response.Write("</td>");
 
K

Ken Cox [Microsoft MVP]

When you use Response.Write, you're just writing text to the Web browser. It
is far to late - and in the wrong place - for the ASP.NET engine to interpret
it as code and generate output.
 
R

Ryan Wade

I'm very new to asp.net and don't know much. Where is the
best place to put my controls creation?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top