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";

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/OMJIbSmkUX4/14581