title: How to assign Javascript return value in c# Code behind Variable
body: <p>How to assign the javascript return value to c# code behind variable, while the page load. I am trying to do this. Please see the below example. I want the exact result like this.</p>
  
  <p>Note : I already posted a question like this,but that is meaning less.</p>
  
  <pre><code>Javascript:
  &lt;script&gt;
  function GetValue() {
  return 10;
  }
  &lt;/script&gt;
  
  C#.NET
  
  protected void Page_Load(object sender, EventArgs e)
  {
  int Data
  ClientScript.RegisterStartupScript(this.GetType(), "GetData", "a=GetValue();alert(a)", true);
  Data=a;//a is Javascript Variable
  }
  </code></pre>