Dynically add include files?

  • Thread starter Thread starter KMG
  • Start date Start date
K

KMG

I have a master page, that uses script to include standardized context. For
instance:
<!--#include virtual="/inc/myHeader.inc" -->

I want the name of the file to be different depending on where the user is
coming from, so if the user is coming from www.hp.com, the url would be
www.hp.com?s=HPRoute and the master page to be loaded would be
myHPHeader.inc.

How can I do this? Exploring ClientScriptManager didn't really do it, it
inserted the code as <script src="inc/myHeader.inc"
type="text/javascript"></script> and didn't display the page at all. What
am I doing wrong? Any ideas are appreciated!
 
Did Mark's reply work for you?

If not, a stupid trick that would probably work (though may not be in
anyone's best programming practices) would be to add an asp.net label
where you want it...

and then in the code....set the label.text to be your html code:

Label.Text = "<!--- #Include File=\"HP.blah\" -->";

--Amit
 
Is actually couldn't get either one to work, so I decided to go with asp.net
2.0 and use master pages. Thanks for the input!
 
Back
Top