Friday, May 09, 2008

Load ASP.NET UserControl programatically

In order to load UserControl programatically into view control of Multiview control of ASP.NET, I wrote the following piece of code

ViewName.Controls.Add(LoadControl("~/UserControlName.ascx"));

No comments: