Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Write Header Variables?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Write Header Variables?

 Post Reply Post Reply
Author
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote Necronom Quote  Post ReplyReply Direct Link To This Post Topic: Write Header Variables?
    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 .
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2005 at 4:01pm
Response.AddHeader name,value

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote Necronom Quote  Post ReplyReply Direct Link To This Post 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 .
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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


Edited by dpyers - 18 April 2005 at 4:23pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.