How to refresh a web form in asp.net using responce.redirect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onlineaccident
    New Member
    • Jan 2008
    • 2

    How to refresh a web form in asp.net using responce.redirect

    hi,


    iam have two pages sample1.aspx and sample2.aspx.

    When i am trying to re-directing sample1.aspx from sample2.aspx,

    using response.redire ct("sample1.asp x").

    and when i try to refresh the sample1.aspx page, by clearing the catch using the following code,even its not refreshing.

    Response.Buffer = true;

    Response.Expire sAbsolute = DateTime.Now.Ad dDays(-1);
    Response.Expire s = -1;
    Response.CacheC ontrol = "no-cache";


    Can any one please find a solution for refreshing in asp.net

    Thanks.
    Onlineaccident
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    This code is inside of sample1.aspx right?
    Code:
    Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
    Response.Expires = -1;
    Response.CacheControl = "no-cache";
    Becuase it wouldn't do any good to have it be in sample2.aspx when it's redirecting to sample1.aspx

    Comment

    Working...