locked
Default web form routing causing loss of some jquery functionality RRS feed

  • Question

  • I have a project that was created using the default templates using 4.5, web forms with windows authentication.

    I noticed it added routing/URL rewriting by default which wasn't a big deal until now.

    I am using a master page.

    So what I ran into is if routing is on. Certain things that load in the document.ready jquery function stop working after the page has posted back for the first time. First time page loads it works just fine. If I remove the routing from the Global.asax then the functionality is restored.

    Abridged code:

    $(document).ready(function () {
    
                $("#ContentPlaceHolder1_chkSubs").change(function () { showHideRuns(); });

    The code above is what stops working, I've forced the control's ID in there just for testing. chkSubs is an ASP:Checkbox that DOES NOT auto post back.  

    I haven't tried just using a basic HTML checkbox to see if the same thing happens (with or without runat="server")

    Strangely enough I have some jquery autocomplete code that runs after  that line above that does continue to work even after a post back.

    Stepping through code produces no errors.

    Friday, January 17, 2014 1:23 PM