Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Button Controls in user control does not post back. (http://www.velocityreviews.com/forums/t66504-button-controls-in-user-control-does-not-post-back.html)

sk2000 11-12-2003 01:03 AM

Button Controls in user control does not post back.
 
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 11-12-2003 03:23 AM

Re: Button Controls in user control does not post back.
 
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" <sk2000@comcast.net> wrote in message
news:055f01c3a8b8$d9799aa0$a401280a@phx.gbl...
> 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 11-12-2003 07:26 AM

Re: Button Controls in user control does not post back.
 
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" <sk2000@comcast.net> wrote in message
>news:055f01c3a8b8$d9799aa0$a401280a@phx.gbl...
>> 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

>
>
>.
>



All times are GMT. The time now is 10:38 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.