Masterpage's postback event not firing for a single page...

Last post 07-23-2009 2:26 PM by JimDotNET. 11 replies.

Sort Posts:

  • Masterpage's postback event not firing for a single page...

    04-01-2008, 3:11 PM
    • Member
      185 point Member
    • servingtulsa
    • Member since 01-17-2003, 2:36 PM
    • Posts 48

    Ok, this one is weird:

     We have a very large and complex application that consists of several master pages all derived from a single base. One of these master pages has a logout button on it... and it works on several of its child pages. On one page, however, when the postback even fires, the button's click event is never kicked off. The __EVENTTARGET is correct, but it never kicks off the event.

     Anyone have any ideas as to why that would be? It works fine in several other webforms...

     

    Thanks!

     

    Dave

  • Re: Masterpage's postback event not firing for a single page...

    04-02-2008, 6:49 AM
    • Contributor
      2,217 point Contributor
    • sudipta
    • Member since 02-25-2008, 3:33 PM
    • India
    • Posts 455

    Place a breakpoint in the Button_Click of the Master Page's logon button and debug.

    ---------------------------------------------------------------

    Please click Mark As Answer if this helped in solving your problem.

     

    Please click "Mark As Answer" if this hepled in solving your problem.
  • Re: Masterpage's postback event not firing for a single page...

    04-02-2008, 8:21 AM
    • Member
      185 point Member
    • servingtulsa
    • Member since 01-17-2003, 2:36 PM
    • Posts 48

    Wow... 

     Um... Ya. Let me try again.

     The method in question is never being fired. We have stepped thru the entire postback.

    Dave

  • Re: Masterpage's postback event not firing for a single page...

    04-03-2008, 3:13 AM

    Hi,

    servingtulsa:
    . One of these master pages has a logout button on it... and it works on several of its child pages. On one page, however, when the postback even fires, the button's click event is never kicked off. The __EVENTTARGET is correct, but it never kicks off the event.

    Please check whether there is a form tag in the conent page, because the  Master pages has defined  the <html>, <head>, <body >, and <form>, tags, it is needn't for the content page.

    Because the content page will replace the content of the conetentplaceholder of the master page at runtime, so this will cause the form tags nested, which is not allowed.

    In the aspx page, if you use more than one pages,  there is only one form tag runat is server, and these form tags cannot be nested.

     

    Hope it helps.

    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Masterpage's postback event not firing for a single page...

    04-03-2008, 9:38 AM
    • Member
      185 point Member
    • servingtulsa
    • Member since 01-17-2003, 2:36 PM
    • Posts 48

    Good idea - but no dice.

     This forms content is very simple, and looks almost identical to 30-40 other forms that are all used and working fine with the same master page.

     Also, other postback events are firing... Just not a button click on the master page. Very strange.

     

    Dave

  • Re: Masterpage's postback event not firing for a single page...

    04-03-2008, 9:57 PM

    Hi,

    Maybe, you need to post the content page's aspx code here for further help.

    And please tell us which button cannot be fired.

    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Masterpage's postback event not firing for a single page...

    05-21-2008, 5:02 AM
    • Member
      12 point Member
    • lalit_dave
    • Member since 05-21-2008, 9:00 AM
    • Posts 6

    Hi Dave,

    Even i have stucked in same problem, please send me solution if you found.   No

  • Re: Masterpage's postback event not firing for a single page...

    05-21-2008, 5:03 AM
    • Member
      12 point Member
    • lalit_dave
    • Member since 05-21-2008, 9:00 AM
    • Posts 6

    Hi Dave,

    Even i have stucked in same problem, please send me its solution if you found it.

     ---- Lalit Dwivedi 

  • Re: Masterpage's postback event not firing for a single page...

    05-21-2008, 7:25 AM
    • Member
      12 point Member
    • lalit_dave
    • Member since 05-21-2008, 9:00 AM
    • Posts 6

    Hi Dave,

    The possible solution for your problem can be if you use "UseSubmitBehaviour='false'" for that specific button.

    The UseSubmitBehavior property specifies if the Button control uses the browser's built-in submit function or the ASP.NET postback mechanism.

    This property is set to TRUE if the control uses the browser's submit function. FALSE otherwise. Default value is TRUE.When set to FALSE, ASP.NET adds a client-side script to post the form. This enables control developers to use the GetPostBackEventReference method to return the client postback event for the Button.

    http://www.w3schools.com/aspnet/prop_webcontrol_button_usesubmitbehavior.asp

    Regards

    Lalit Dwivedi,

    Cybage, Pune

  • Re: Masterpage's postback event not firing for a single page...

    06-10-2008, 6:43 AM
    • Member
      8 point Member
    • dcalpin
    • Member since 05-23-2006, 9:34 AM
    • Posts 9

    This could also be caused by the CausesValidation option been set to "true".

  • Re: Masterpage's postback event not firing for a single page...

    09-26-2008, 4:00 AM
    • Member
      2 point Member
    • ccwang
    • Member since 08-07-2008, 4:26 PM
    • Posts 2

    Yes, I also have this problem. that is my Log Out button not working at some pages.

    Thanks for you all information. I solved it by making sure my LogOut Button at master page to have "USeSubmitBehaviour=false" and "CauseValidation=false".

     

  • Re: Masterpage's postback event not firing for a single page...

    07-23-2009, 2:26 PM
    • Member
      2 point Member
    • JimDotNET
    • Member since 07-23-2009, 2:25 PM
    • Posts 1

    This solve my issue too. "USeSubmitBehaviour=false" and "CauseValidation=false"

    Thanks for the tip.

Page 1 of 1 (12 items)