Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Code behind and onclick on html table row (http://www.velocityreviews.com/forums/t774182-code-behind-and-onclick-on-html-table-row.html)

Corno 09-03-2004 08:45 PM

Code behind and onclick on html table row
 
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



Eliyahu Goldin 09-05-2004 09:19 AM

Re: Code behind and onclick on html table row
 
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:eKLanbfkEHA.2668@TK2MSFTNGP12.phx.gbl...
> 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
>
>





All times are GMT. The time now is 11:30 PM.

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