Forum Moderators: open

Message Too Old, No Replies

Populating label text from a hyperlink

Just a quick question to see if anyone knew if this is possible

         

Jimmy Turnip

10:05 am on Dec 19, 2003 (gmt 0)

10+ Year Member



Is it possible in asp.net to populate text of a label dynamically depending on the hyperlink that is pressed on the same page?

My current solution is simply having the hyperlinks point to the current page with a select case statement dependant on the querystring. Is there a way I can do this dynamically without the page having to reload? A bit like when you have a regular expression validator and the error message text appears dynamically on the page, even without the page being posted back.

korkus2000

1:52 pm on Dec 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to use javascript for this. You want to use the getElementById method and toggle the display element of your layer. I would not use a label because you won't know what the id will be. Also make sure you don't run your div at server.