title: Accessing C# Variables in JavaScript
body: <p>I am Developing Windows 8 application in which i have to access variables of C# class in java script function, But Unfortunately i don not know how to do this:
  My C# class code is:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Pakistan_Tour
  {
     public class UniversalValues
  {
     public static double xC;
     public static double yC;
  
  public  static  int selectedcity;
  
       public int retcity() 
      {
          return selectedcity;
  
      }
      public void setcity(int val)
      {
           selectedcity=val;
      }
      public void setxy(double x, double y)
      {
          xC = x;
          yC = y;
  
      }
      public double getx()
      {
          return xC;
      }
      public double gety()
      {
          return yC;
      }
  
  
   }
  }
  </code></pre>
  
  <p>I have to access the value of variables: 
      xC and yc
  in java script I am doing like:</p>
  
  <pre><code> function initialize() {
  
          var x = "&lt;%=xC%&gt;";
  
          var y = "&lt;%=yC%&gt;";
  }
  </code></pre>
  
  <p>but is not working, Kindly help me with this, Thanks in advance.</p>