Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Code behind and onclick on html table row

Reply
Thread Tools

Code behind and onclick on html table row

 
 
Corno
Guest
Posts: n/a
 
      09-03-2004
Hi all,

I have a page with a table of which the rows have to be added dynamically.
What I also want is 'code behind' the onclick event of a row (the page
should be posted back to the server, which should handle the onclick).
However, as the rows are added dynamically, I cannot give them an ID at
designtime and attach a function to it. Is there a way to write one function
for all added rows but that is able to distinguish which of the rows were
clicked? Or is there another way to do this?

TIA,

Corno


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-05-2004
Corno,

You will have to use a client-side "onclick" event. You can pass it a
parameter "this" which will refer to the clicked html table row.

Eliyahu

"Corno" <Corno@dds%FAKE%.nl> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I have a page with a table of which the rows have to be added dynamically.
> What I also want is 'code behind' the onclick event of a row (the page
> should be posted back to the server, which should handle the onclick).
> However, as the rows are added dynamically, I cannot give them an ID at
> designtime and attach a function to it. Is there a way to write one

function
> for all added rows but that is able to distinguish which of the rows were
> clicked? Or is there another way to do this?
>
> TIA,
>
> Corno
>
>



 
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
Non-code behind to code behind John ASP .Net 2 02-19-2007 07:08 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM
Code behind and onclick on html table row Corno ASP .Net 2 09-05-2004 09:19 AM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM



Advertisments