locked
urlrewriting.net postback ajax RRS feed

  • Question

  • User528325736 posted

    I have implemented urlrewriting in my web application and it works fine , I used this solution www.urlrewriting.net

     but I am haveing some problems with postbacks and AJAX, they simply dont work. I know there is a solution for this out there but I can't find it. i have googled alot but i havent an answer.

    Sunday, March 22, 2009 11:45 AM

Answers

  • User528325736 posted

     turns out to be that when i set a postback url for my imagebutton , the clickevent for my other buttons will not fire!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 11, 2009 5:08 PM

All replies

  • User-792405933 posted

    Hello

    I had the same issue, caused by the fact that the action of the form is the rewritten url rather than the submitted url. If you're using .net 3.5 SP1 you can change the form action in page_load using formName.Action = Request.RawUrl. This was working fine for me until I deployed to a production server which has .net 3.5 but not SP1. In the short term (until I wait for downtime to deploy SP1) I had a look at this fix:-

     http://aspalliance.com/1234_TipTrick_Url_Rewriting_with_ASPNET.all#Page4

     See the bit about the form control adapter.

    After that I had another problem on the production server where a Response.Redirect would not take into account the supplied url but would redirect relative to the rewritten url.

    eg if the browser was showing www.abcd.com/test1/default.aspx

    and the rewritten url was www.abcd.com/test1home.aspx

    Then the following code

    Response.Redirect("testpage.aspx");

    would redirect to www.abcd.com/testpage.aspx rather than www.abcd.com/test1/testpage.aspx.

     This only happened on a server that didn't have SP1. Under VS2008 and a test server with SP1, I didn't get this behaviour.

     Anyone any ideas?

    Tuesday, March 24, 2009 10:49 AM
  • User528325736 posted

     thanks for the response. I agree this dosent work in VS2008.

     

    anyone got a solution?

    Monday, March 30, 2009 3:45 PM
  • User528325736 posted

     turns out to be that when i set a postback url for my imagebutton , the clickevent for my other buttons will not fire!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 11, 2009 5:08 PM