c# - How to display a user control source code on an .aspx page? -
i trying build aspx page displays user control along code , code behind user control. there way code user control page , display it?
you this:
fileinfo mycontrol = new fileinfo(server.mappath(@"~\test.aspx.cs")); streamreader mycontrolsource = mycontrol.opentext(); string mycontrolsourcehtml = server.htmlencode(mycontrolsource.readtoend()); put in method , point file source code html , use css style see fit.
Comments
Post a Comment