On loading the page I want to pass a value to my javascript function from a server side variable.
I cannot seem to get it to work this is what I have:
Asp.Ne
I believe your C# variable must be a class member in order to this. Try declaring it at the class level instead of a local variable of Page_Load(). It obviously loses scope once page_load is finished.
public partial class Example : System.Web.UI.Page
{
protected string blah;
protected void Page_Load(object sender, EventArgs e)
{
blah = "ER432";
//....