Button Controls in user control does not post back.

  • Thread starter Thread starter sk2000
  • Start date Start date
S

sk2000

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
 
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.
 
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
 
Back
Top