I'm trying to set a javascript variable equal to a label value in an asp.net page. This is what I currently have, but it doesn't work. Could someone please let me know what I'm doing wrong? Thanks.
well, assuming what you've provided is supposed to be run as script (as opposed to some html element attribute), and you've previously defined "lblBrand", and you've defined a function findcontrol() which returns an object containing a "text" property, then this should work:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.