A
ad
I write a javascript function, it require a string parameter:
<asp:TextBox ID="TextBox1" runat="server"
onclick="MyJavascript('Tiger');"></asp:TextBox>
I want bind a variable to the parameter, like:
<asp:TextBox ID="TextBox1"
runat="server"onclick="MyJavascript('<%#sName%>');"></asp:TextBox>
and write some code in the code behind file:
public string sName= "Tiger";
protected void Page_Load(object sender, EventArgs e)
{ DataBind(); }
But after run , it assign a null value the parameter!
How can I do?
<asp:TextBox ID="TextBox1" runat="server"
onclick="MyJavascript('Tiger');"></asp:TextBox>
I want bind a variable to the parameter, like:
<asp:TextBox ID="TextBox1"
runat="server"onclick="MyJavascript('<%#sName%>');"></asp:TextBox>
and write some code in the code behind file:
public string sName= "Tiger";
protected void Page_Load(object sender, EventArgs e)
{ DataBind(); }
But after run , it assign a null value the parameter!
How can I do?