"Live Text" as it were
-
I want to have a piece of text that I can click that will in effect, be 'live'. What I want to do is place an event handler on the text when it is clicked. Unfortunately, I cannot simply have it as a link. Thanks a lot, Jim
-
I want to have a piece of text that I can click that will in effect, be 'live'. What I want to do is place an event handler on the text when it is clicked. Unfortunately, I cannot simply have it as a link. Thanks a lot, Jim
A client side event handler or server side? For a client side handler, you could simply wrap the text in a
span
tag, such as:<span onclick = "myMethod()">Your Text Here</span>
For a server side event, you may be well served using aLinkButton
control. If not, I'd recommend that you consider making your "live text" a custom web control. To get started, you may want to take a peek at the interfaceIPostBackEventHandler
in the MSDN documentation. Hope that helps a bit. :) --Jesse