473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dynically add include files?

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"></scriptand didn't display the page at all. What
am I doing wrong? Any ideas are appreciated!
Jan 17 '07 #1
3 929
"KMG" <Ka***********@Yahoo.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
How can I do this?
http://msdn2.microsoft.com/en-us/lib....htmlhead.aspx
Jan 17 '07 #2
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
Mark Rae wrote:
"KMG" <Ka***********@Yahoo.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
How can I do this?

http://msdn2.microsoft.com/en-us/lib....htmlhead.aspx
Jan 17 '07 #3
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!
"AmitKu" <am****@gmail.comwrote in message
news:11*********************@11g2000cwr.googlegrou ps.com...
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
Mark Rae wrote:
>"KMG" <Ka***********@Yahoo.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
How can I do this?

http://msdn2.microsoft.com/en-us/lib....htmlhead.aspx

Jan 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chad Scharf | last post by:
I have a legacy ASP application running on IIS 6.0 (Windows Server 2003 Web Edition) that is throwing an error when processesing a certain asp page that has about 200 or so include directives. ...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
7
by: mescaline | last post by:
Hi, Suppose a_file.cpp contains a function a_function() Now to include it in main_file.cpp I just do #include "a_file.cpp" and I'm all set. i recently came across this seemingly roundabout...
6
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i define a global variable in a file, say main.c, and...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: ya man | last post by:
when i use #include <iostream.h> in some files i get lots of error messages of the kind 'ambiguous symbol this is solved when i use #include <iostream why is that ? and can i use #include...
2
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
16
by: Chris Shearer Cooper | last post by:
In our Visual Studio 2005 application, we have several of our application's H files that are #included into stdafx.h. What is odd, is that when we change those application H files, VS2005...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.