title: Universal apps: call c# method from javascript
body: <p>I am working with universal apps in Visual Studio 2015 since a few days and I have absolutely no clue how to access a c# method in a class since there is no "WebMethod"-Attribute. </p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function getWindowsDeviceUUID() {
          //$.ui.popup({
          //    title: "methodcall",
          //    message: "trying to call methode"
          //}
          //    );
          $.ajax({
              type: 'POST',
              url: 'MainPage.xaml.cs/GetDeviceUUID',
              contentType: 'application/json; charset=utf-8',
              dataType: 'json',
              success: function (uuid) {
                  $.ui.popup({
                      title: "success",
                      message: "called method"
                  }
                      );
                  return uuid;
              }
          });
      };
  &lt;/script&gt;
  </code></pre>
  
  <p>I already tried it with ajax but the "GetDeviceUUID"-method isn't called. However the getWindowsDeviceUUID is.</p>
  
  <p>Some Additional Information:
  I already have multiple JS &amp; HTML files I have to use in this app.
  I open the HTML-Sites via a WebView control.</p>
  
  <p>Kind regards</p>