You must Sign In to post a response.
  • Category: Webservices

    Why Response.redirect not working in asp.net ?


    Are you looking for a way to know Why Response.redirect not working in asp.net ? then read this thread to know why it is not working



    I have a login page where on submiting inputs of login page will ge given to a webservice.From that webservice we get some output in xml format only .using this output we are assigning values to some hiddenfields in loginpage and at the same time forming the url from the output.
    now when i give response.redirect("url");
    it is not going to that url.

    but when i give that submit button postbackurl ="url";
    it is going to same url and again when we login it is redirecting to the given url which i want can any one tell why it is happening

    why when i am giving response.redirect="url" it is not going to that required url
  • #756529
    The Response.Redirect method sends a Status Code 300 to the browser which directs the user to a new page, I think it is a postback issue that's why you are not redirected to new page after returning from web service
    Just try to dig out the issue by putting break point on page_load, means when you hit response.redirect it should hit to page_load

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #756577
    Hi,

    Try in the following way

    response.redirect("url" ,true);

    response.redirect("url" ,false);


    Cheers!!!!

    Rajesh Kumar Parbat
    (Mentor,Editor,MVM)


  • Sign In to post your comments