User Control in Asp.net?
How can we create user control in run time in web application?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Mar 27, 2012, 7:38 PM EDT
Please look into these urls:
http://www.etechplanet.com/blog/adding-aspnet-user-controls-at-run-time-using-c-code.aspx
http://msdn.microsoft.com/en-us/library/c0az2h86(v=vs.85).aspx
http://stackoverflow.com/questions/9069347/how-to-add-user-control-on-run-time-in-asp-net-solved
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 27, 2012, 7:41 PM EDT
user control is contain one or more control and in form of ascx.
i think you can not create user control run time.
But...
Do one thing.
create blank user control.
fill control run time as per the requirement
load user control run time using Page.LoadControl("myusercontrol.ascx")
add it to page.
hope this help.