Page nk = new Page(); UserControl ct1 = (UserControl)nk.LoadControl("~/testusercontrol.ascx"); nk.Controls.Add(ct1); StringWriter wrs = new StringWriter(); HttpContext.Current.Server.Execute(nk, wrs, false); return wrs.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)