locked
HttpContext RRS feed

  • Question

  • User2130931299 posted

    HI,

    I am having a problem when i am using httpcontext.rewritepath("test.aspx") in a page_load event of webform.aspx page , it doesn't redirect to test,aspx page.

    can u pls let me knw where i am wrong and its better if u can explain me in detail regarding httpcontext.rewritepath

     

    Thanks,

    Ketan

    Thursday, March 8, 2007 5:16 AM

All replies

  • User-846453637 posted

    Why not use, Response.Redirect("test.aspx")

    rewritepath is most commonly used at the begin of an httprequest, in the BeginRequest of ur application, cause u cannot rewrite ur path after it has been analyzed

    check this article it will explain a bit more

    http://www.awprofessional.com/articles/article.asp?p=25339&seqNum=3&rl=1

    Thursday, March 8, 2007 5:43 AM
  • User748948342 posted
    If you intended to hide of redirected url then use Server.Execute it will return to current page after executing handler name provided
    Thursday, March 8, 2007 7:57 AM