Button Controls in user control does not post back.

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
 
O

Oliver

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.
 
K

Kumar

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top