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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -