Button Controls in user control does not post back.

Discussion in 'ASP .Net' started by sk2000, Nov 12, 2003.

  1. sk2000

    sk2000 Guest

    Hello All,

    I'm creating a web form with user controls in different
    HTML table cells (User Controls are place in the table
    cells at design time ). For some reason none of the Button
    type controls in the User Controls are causing a post
    back. Any other controls with 'AutoPostBack' set to true
    are working just fine.
    I've checked to see that these button controls are not
    getting into a disabled table cells /HTML area etc, but
    I'm still not able figure out what could be causing this.
    Any thoughts for trouble shooting this scenario are
    appreciated.

    Thanks,
    -Kumar
     
    sk2000, Nov 12, 2003
    #1
    1. Advertising

  2. sk2000

    Oliver Guest

    Hi Kumar,

    You didn't show us your code, but make sure that your event handler has the
    Handles clause in it. Older versions of VS.NET sometimes deleted that part
    without warning.

    "sk2000" <> wrote in message
    news:055f01c3a8b8$d9799aa0$...
    > Hello All,
    >
    > I'm creating a web form with user controls in different
    > HTML table cells (User Controls are place in the table
    > cells at design time ). For some reason none of the Button
    > type controls in the User Controls are causing a post
    > back. Any other controls with 'AutoPostBack' set to true
    > are working just fine.
    > I've checked to see that these button controls are not
    > getting into a disabled table cells /HTML area etc, but
    > I'm still not able figure out what could be causing this.
    > Any thoughts for trouble shooting this scenario are
    > appreciated.
    >
    > Thanks,
    > -Kumar
     
    Oliver, Nov 12, 2003
    #2
    1. Advertising

  3. sk2000

    Kumar Guest

    I've found out what is causing the problem. My user
    controls on the form have several HTML tables on them.
    I've the same IDs (e.g ID="Table1" on two user controls on
    the same page ) used for different tables on different
    user controls.
    Surprisingly making these IDs unique, is making the post
    back work for <ASP:Button> controls contained within these
    table cells.
    I'm still not able to understand on how this can be
    affecting the post back of the buttons though.
    I know that original problem did not happen due to missing
    event handlers for the buttons. Infact I was not even
    getting to the Page_Load on the button click.

    -Kumar
    >-----Original Message-----
    >Hi Kumar,
    >
    >You didn't show us your code, but make sure that your

    event handler has the
    >Handles clause in it. Older versions of VS.NET sometimes

    deleted that part
    >without warning.
    >
    >"sk2000" <> wrote in message
    >news:055f01c3a8b8$d9799aa0$...
    >> Hello All,
    >>
    >> I'm creating a web form with user controls in

    different
    >> HTML table cells (User Controls are place in the table
    >> cells at design time ). For some reason none of the

    Button
    >> type controls in the User Controls are causing a post
    >> back. Any other controls with 'AutoPostBack' set to true
    >> are working just fine.
    >> I've checked to see that these button controls are not
    >> getting into a disabled table cells /HTML area etc, but
    >> I'm still not able figure out what could be causing

    this.
    >> Any thoughts for trouble shooting this scenario are
    >> appreciated.
    >>
    >> Thanks,
    >> -Kumar

    >
    >
    >.
    >
     
    Kumar, Nov 12, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kaustav Neogy

    button click does not post back

    Kaustav Neogy, Aug 13, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    542
    Kaustav Neogy
    Aug 13, 2003
  2. sylvia sil
    Replies:
    1
    Views:
    621
    Curt_C [MVP]
    Dec 29, 2004
  3. Jose Walker
    Replies:
    0
    Views:
    723
    Jose Walker
    Jul 27, 2006
  4. =?Utf-8?B?Z29yaWxsYQ==?=
    Replies:
    1
    Views:
    778
    Masudur
    May 25, 2007
  5. Wolfgang Brucker

    user controls: dynamiclly added child controls dont survive post back ?

    Wolfgang Brucker, Jan 14, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    528
    Victor Garcia Aprea [MVP]
    Jan 14, 2004
Loading...

Share This Page