Response.AppendHeader barfs

Discussion in 'ASP .Net' started by Timo, Mar 23, 2005.

  1. Timo

    Timo Guest

    After reading KB234067, I am trying to replace this:

    <META http-equiv="CACHE-CONTROL" content="NO-CACHE">
    <META http-equiv="Pragma" content="no-cache">
    <META http-equiv="Expires" content="0">

    with corresponding Response.AppendHeader() calls in the code-behind, because
    of the KB's admonition "Note that the use of standard HTTP headers are [sic]
    much preferred over META tags...There is at least one known problem with the
    Pragma HTTP-EQUIV meta tag".

    But how do I do this? <%# Response.AppendHeader("Pragma","no-cache") %>
    cause the code to break with the error that there is no accessible ToString
    method for the second argument. Not sure what I'm doing wrong.
    Thanks
    Timo
    Timo, Mar 23, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mei Qin

    How to pass variable to AppendHeader

    Mei Qin, May 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    371
    Mei Qin
    May 19, 2004
  2. ujjc001
    Replies:
    2
    Views:
    4,432
    ujjc001
    Jul 28, 2005
  3. Bill Davy
    Replies:
    12
    Views:
    872
    Bill Davy
    Apr 22, 2005
  4. P4trykx
    Replies:
    1
    Views:
    541
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 6, 2007
  5. Replies:
    4
    Views:
    472
    George
    Oct 9, 2008
Loading...

Share This Page