Live Chat Icon For mobile
Live Chat Icon

How to create dynamic javascripts in server side code based on server side variables?

Platform: ASP.NET| Category: Client Side Scripting

Here’s and example:


Dim value As String = 'pic1.jpg'
Button1.Attributes('onMouseOver') = 'alert( ’' + value + '’);'


string value = 'pic1.jpg'; 
Button1.Attributes['onMouseOver'] = 'alert( \'' + value + '\');' ;

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.