bmanmike39
asked on
How do I move a JavaScript Variable to an asp.net code behind Variable (C#)
I have a java function that returns a value, in a var named Rm I want to move that value to a ASP.NET variable named netRm. Can someone show me how to do this. Im using C# in my code behind page.
Below is my code:
Below is my code:
Aspx:
<label for="x1">x1:</label>
<script> var Rm = x1;</script>
<asp:Label ID=" Lblx1" runat="server" Text="Label"></asp:Label>
CodeBH:
String netRm;
Lblx1.text = netRm;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!!
public string Name;
protected void btnTest_Click(object sender, EventArgs e)
{
Response.Write(hdnField.Va
Name = hdnField.Value;
}
or in aspx
<%=Name %>