i have a page where in the form load i initialize a server side variable with value and i want to render that value in js section. i am working with asp.net webform apps.
my server side page load code
string errblankEmail ="";
protected void Page_Load(object sender, EventArgs e)
{
errblankEmail ="Hello World";
}
if (str == '') {
alert('<% =errblankEmail %>');
}
when i run the page then i am getting error message like CS0103: The name 'errblankEmail' does not exist in the current context
and i also saw that my page_load is not getting called because i set break point there. so guide me how to fix this problem. thanks