locked
URL Redirection Problem RRS feed

  • Question

  • User-2062783045 posted

    Hi Friends,


              I am using Intelligencia.UrlRewriter URl Rewriting in my application.When i try to redirect from one page to another page that is situated in a folder.It works properly means.


              For Example i have 2 folders Test and Application.In the Default page i put a link button to redirect to Test.aspx page that is situated in Test Folder.It works properly and in the test.aspx page i put a link to redirect to Application page that is situated in Application Folder.Then the redirection fails.What is the reason Please try to find out a solution for that.

              I call the redirection using Response.redirect("Test"); for redirection to testpage.

              I call the redirection using Response.redirect("Application"); for redirection to Application page.

    Saturday, August 8, 2009 2:57 AM

Answers

  • User60291871 posted

     Hi, Try using the virtual path identifier  '~' as follows:

    Response.Redirect("~/Test.aspx")
    Response.Redirect("~/Application.aspx")

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 8, 2009 4:30 PM

All replies

  • User60291871 posted

     Hi, Try using the virtual path identifier  '~' as follows:

    Response.Redirect("~/Test.aspx")
    Response.Redirect("~/Application.aspx")

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 8, 2009 4:30 PM
  • User-2062783045 posted

    Thanks for your kind reply sir.

    I given the rewrite url in webconfig like this.If i call the url as you specified  Response.Redirect("~/Test.aspx") it will display in the url Test.aspx.I have to avoid the aspx extension so that i used the url rewriting.How is it possible.

    Web config file ::<rewrite url="^~/Test$" to="~/Test/Test.aspx"/>
        <rewrite url="^~/DisplayForum" to="~/Forum/DisplayForum.aspx"/>

    I call the redirect url like Response.Redirect("Test");



    Monday, August 10, 2009 12:33 AM