Response.redirect gives error Bad request 400 RRS feed

  • Question

  • I did not have any problem working in vs 2008 but when i moved the project to vs 2010, the Response.redirect started acting wierd and adds special characters to the specified url and so i get the error 400 bad request. It is a simple control page, where I have a button, on whose click, the response.redirect is called:


    Response.RedirectPermanent(ResolveUrl("addNewPopup.aspx") + "?orgID=" + this.OrganizationID);

    When I build it, instead of taking me to a the specified page i.e localhost:2504/padrap/pages/admin/addNewPopup.aspx?orgID=33

    it takes me to http://localhost:2504/padrap/pages/admin/%2fpadrap%2fpages%2fadmin%2faddNewPopup.aspx%3forgID%3d33.

    Is there a work around? I found on other forum where someone had to use registerbasescript to redirect.

    Wednesday, June 23, 2010 9:18 PM

All replies

  • I'm getting the same error, but crashes only in a page, the entire site works ok...


    It seems to be a problem with updatepanels. I've tried adding the button that causes the Redirect as PostBackTrigger and it works perfectly!

    Why can't do a redirect from an asyncpostback?


    I solve the problem. You just have to update AjaxControlToolkit to version 4 (mine is 4.1.40412.2) and it will work.




    • Proposed as answer by kamikazedc Wednesday, November 17, 2010 11:13 AM
    Wednesday, November 17, 2010 10:54 AM