Dynically add include files?

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!
 
A

AmitKu

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
 
K

KMG

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top