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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying an Environment Variable in the Header Bar

Status
Not open for further replies.

SpokaneTJ

Technical User
Dec 9, 2003
25
US
I have a 2003 web server that is running IIS6 ASP.net 2.0.

I have set an Environment Variable on the server called EV which = PWQC

I have a web.cofig file with the following line

<item name="Presentation.EnvironmentType" value="DITUAT"/>

I have tried the following

<item name="Presentation.EnvironmentType" value="%EV%"/>
which displayed the %EV% in the Header Bar of the web page

I need to be able to draw the value of the variable so that it will dsiplay in the header bar. Any help would be greatly appreciated. Thanks.

Troy
 
I'm not 100% sure what you mean by header bar. However in ASP.NET, you can retrieve your variable with this statement:

<%
Response.Write(Environment.GetEnvironmentVariable("EV"))
%>

Which is the same as

<%=Environment.GetEnvironmentVariable("EV")%>


[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top