Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Access Server Side Variable In Javascript

DZone's Guide to

Access Server Side Variable In Javascript

·
Free Resource
Add following javascript function to aspx page


function check() {
 alert("this is check value " + '<%= checkvalue %>');
}


Add following variable declaration on server side i.e aspx.cs

 public string checkvalue ="indrnilhafa";

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}