Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button Controls in user control does not post back.

Reply
Thread Tools

Button Controls in user control does not post back.

 
 
sk2000
Guest
Posts: n/a
 
      11-12-2003
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
 
Reply With Quote
 
 
 
 
Oliver
Guest
Posts: n/a
 
      11-12-2003
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



 
Reply With Quote
 
 
 
 
Kumar
Guest
Posts: n/a
 
      11-12-2003
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

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.Controls.Add(Control) Does Not Add Control to child collection (this.Controls.Count == 0) Chad Scharf ASP .Net 3 10-18-2007 03:53 PM
Change web controls in one user control from another user control =?Utf-8?B?REo=?= ASP .Net 2 12-01-2005 08:26 AM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Building Controls 1 01-04-2005 04:09 PM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Web Controls 1 01-04-2005 04:09 PM
user controls: dynamiclly added child controls dont survive post back ? Wolfgang Brucker ASP .Net Building Controls 1 01-14-2004 09:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57