Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include HTML file in a Web User Control (.ascx)

Status
Not open for further replies.

bikh

Programmer
May 3, 2002
25
US
This is on an asp.net project.
I have an ASPX that loads different ASCXs into a preset layout. I would like to create an ASCX that loads html files and renders them into the ASPX layout. I've tried Server.Execute, but that gives me problems with some of the unusual characters in HTML. Any suggestions?
 
Howabout a regular old include directive?

<!-- #include file="somefile.html" -->

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
that would work, however I would like "somefile.html" to be a variable that I can change. When somefile.html is a variable the "#include" doesn't work anymore, at least when I tried it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top