Print Page | Close Window

Write Header Variables?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14711
Printed Date: 29 March 2026 at 6:49pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Write Header Variables?
Posted By: Necronom
Subject: Write Header Variables?
Date Posted: 15 April 2005 at 3:36pm
Is it possible to write header variable using ASP or .NET? If so, can someone please explain how?

Thanks!

. necronom .

-------------
http://www.BodyMod.org - Body Modification Organization



Replies:
Posted By: dpyers
Date Posted: 15 April 2005 at 4:01pm
Response.AddHeader name,value


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Necronom
Date Posted: 18 April 2005 at 12:36pm
When I do that, I can see the header in the Response headers just for the page i add that to, but when I run this code, it doesn't show up. How do I get it in there? If I can't get it in there, is it possible to make the header last longer than just the one page? (Sorry if this sounds so trivial, but I'm at a loss!)

MyCode:
<%
Response.AddHeader "TEST","MyValue"
%>
<TABLE BORDER=2>
<TR>
        <TD><B>Server Variable</B></TD>
        <TD><B>Value</B></TD>
</TR>
<% For Each Item In Request.ServerVariables %>
<TR>
        <TD><FONT SIZE="-1"><%= Item %></FONT></TD>
        <TD><FONT SIZE="-1"><%= Request.ServerVariables(Item) %> </FONT></TD>
</TR>
<% Next %>
</TABLE>

Thank you!

. necronom .

-------------
http://www.BodyMod.org - Body Modification Organization


Posted By: dpyers
Date Posted: 18 April 2005 at 4:19pm
A header only applies to a single request - e.g. a single page view, a single file dwnload, etc. It doesn't have session scope. cookies last for the llfe of the session?
 
EDIT: URL for a header viewer - http://www.rexswain.com/httpview.html - http://www.rexswain.com/httpview.html


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net