469,618 Members | 2,613 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,618 developers. It's quick & easy.

Capture server event when a user clicks a <TD>?

If I want to have the form submit when a user clicks on table cell as follows
on a menu something like..

<td style="cursor:hand;" onmouseover="this.style.backgroundColor='white'"
onmouseout="this.style.backgroundColor='blue'" id="ProductList"
onclick="__doPostBack('ProductList', '')">View Product List</td>

Is checking the _EVENTTARGET in the Page_Load the only way to determine that
it was clicked?

If Request.Form("__EVENTTARGET") = "'ProductList'" Then ...

Or can I somehow wireup the an event?

Thanks
Nov 19 '05 #1
1 1085
If you add the tags runat="server" and id="some_value" the TD can be treated
as if it is a server side tag. Assigning a click is pretty straight-forward
from that point, as it will behave as any other server-side element will.

F Buchan

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:C2**********************************@microsof t.com...
If I want to have the form submit when a user clicks on table cell as
follows
on a menu something like..

<td style="cursor:hand;"
onmouseover="this.style.backgroundColor='white'"
onmouseout="this.style.backgroundColor='blue'" id="ProductList"
onclick="__doPostBack('ProductList', '')">View Product List</td>

Is checking the _EVENTTARGET in the Page_Load the only way to determine
that
it was clicked?

If Request.Form("__EVENTTARGET") = "'ProductList'" Then ...

Or can I somehow wireup the an event?

Thanks

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Terry | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.