Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Setting events for button within asp:table

Reply
Thread Tools

Setting events for button within asp:table

 
 
Kevin
Guest
Posts: n/a
 
      12-09-2003
I am just learning asp.net and ran into a problem that I have not been able
to resolve. I have a web form with an html table that houses an asp:label,
asp:textbox and asp:button within. I had the click event of the asp:button
working.

I then decided to drop an asp:table on the form and then added the three
component mentioned above into the asp:table. Now I cannot find a way to
set the click even of the asp:button anymore. In fact, when I attempt to
select the button in design mode, the entire table becomes selected. I
cannot seem to select a component within the asp:table.

How can I set the click event for my button using this method?

Thanks,
Kevin


 
Reply With Quote
 
 
 
 
Suresh
Guest
Posts: n/a
 
      12-09-2003
One way to add the event thru HTML code view for the
button control that inside the asp:table.

Second(kinda dumb) is to take the control outside of the
asp:table and attach the onclick event from the design
mode. Then put the button back in the asp:table.

Third don't use the asp:table. Just go with regular HTML
table. If you want server side functionality you can
always set the HTML table to runat="server".

HTH,
Suresh.

>-----Original Message-----
>I am just learning asp.net and ran into a problem that I

have not been able
>to resolve. I have a web form with an html table that

houses an asp:label,
>asp:textbox and asp:button within. I had the click event

of the asp:button
>working.
>
>I then decided to drop an asp:table on the form and then

added the three
>component mentioned above into the asp:table. Now I

cannot find a way to
>set the click even of the asp:button anymore. In fact,

when I attempt to
>select the button in design mode, the entire table

becomes selected. I
>cannot seem to select a component within the asp:table.
>
>How can I set the click event for my button using this

method?
>
>Thanks,
>Kevin
>
>
>.
>

 
Reply With Quote
 
 
 
 
Kevin
Guest
Posts: n/a
 
      12-12-2003
Thanks for the options Suresh. I thought of the second option, but I have
experienced strange behavior with Visual Studio 2003 when cutting and
pasting so I am learing about using this option, especially since other
developers may have to maintain the code.

I didn't want to use an HTML table because I couldn't fugure out how to make
the table visible or invisible progmatically in the code behind.

Like I mentioned, I am just learning asp (and html coding), but I will
definately look into how to add the event in the HTML code view.

Kevin



"Suresh" <> wrote in message
news:05a301c3beb0$238b9e60$...
> One way to add the event thru HTML code view for the
> button control that inside the asp:table.
>
> Second(kinda dumb) is to take the control outside of the
> asp:table and attach the onclick event from the design
> mode. Then put the button back in the asp:table.
>
> Third don't use the asp:table. Just go with regular HTML
> table. If you want server side functionality you can
> always set the HTML table to runat="server".
>
> HTH,
> Suresh.
>
> >-----Original Message-----
> >I am just learning asp.net and ran into a problem that I

> have not been able
> >to resolve. I have a web form with an html table that

> houses an asp:label,
> >asp:textbox and asp:button within. I had the click event

> of the asp:button
> >working.
> >
> >I then decided to drop an asp:table on the form and then

> added the three
> >component mentioned above into the asp:table. Now I

> cannot find a way to
> >set the click even of the asp:button anymore. In fact,

> when I attempt to
> >select the button in design mode, the entire table

> becomes selected. I
> >cannot seem to select a component within the asp:table.
> >
> >How can I set the click event for my button using this

> method?
> >
> >Thanks,
> >Kevin
> >
> >
> >.
> >



 
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
Responding to Button control events when Button is added to a Table Control Jim Gilligan ASP .Net Web Controls 0 09-01-2005 06:29 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
order of events - dynamic checkbox events =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?= ASP .Net 0 08-17-2005 10:36 PM
Re: passing variables between web page events & httpmodules events Alvin Bruney ASP .Net 1 11-24-2003 04:14 PM
Passing Variables between Web Page Events and HttpModule Events shiv ASP .Net 0 11-21-2003 04:29 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