In this asp.net tutorial you will learn how to pass the variable value from asp.net code behind to javascript. It is quite easy and handy. You must know how to do so because in certain cases you may have to pass value from asp.net code behind to javascript.
Code for aspx.cs fileHow to pass the variable value from asp.net code behind to javascript
//Declaring protected type string variable protected string myMessageFromCodeBehind; protected void Page_Load(object sender, EventArgs e) { //Assigning Value to variable myMessageFromCodeBehind = "I am server Side Code accessed in Javascript"; }
Tags:
asp.net