title: How to add JavaScript function to c#?
body: <p>I'm building a program in c# that includes google maps. I am trying to add a function that adds info window to a map according to user's insert. The problem is I have only found a JavaScript code function (that not completely suits) but I don't know how to add it to c#.
  What I need is a way to connect the JS function, or a new c# function that fits.
  This is the JS function I've found:</p>
  
  <pre><code>// This example displays a marker at the center of Australia.
  // When the user clicks the marker, an info window opens.
  
  function initMap() {
      var uluru = {lat: -25.363, lng: 131.044};
      var map = new google.maps.Map(document.getElementById('map'), {
          zoom: 4,
          center: uluru
      });
  
      var contentString = '&lt;div id="content"&gt;'+
          '&lt;div id="siteNotice"&gt;'+
          '&lt;/div&gt;'+
          '&lt;h1 id="firstHeading" class="firstHeading"&gt;Uluru&lt;/h1&gt;'+
          '&lt;div id="bodyContent"&gt;'+
          '&lt;p&gt;&lt;b&gt;Uluru&lt;/b&gt;, also referred to as &lt;b&gt;Ayers Rock&lt;/b&gt;, is a large ' +
          'sandstone rock formation in the southern part of the '+
          'Northern Territory, central Australia. It lies 335&amp;#160;km (208&amp;#160;mi) '+
          'south west of the nearest large town, Alice Springs; 450&amp;#160;km '+
          '(280&amp;#160;mi) by road. Kata Tjuta and Uluru are the two major '+
          'features of the Uluru - Kata Tjuta National Park. Uluru is '+
          'sacred to the Pitjantjatjara and Yankunytjatjara, the '+
          'Aboriginal people of the area. It has many springs, waterholes, '+
          'rock caves and ancient paintings. Uluru is listed as a World '+
          'Heritage Site.&lt;/p&gt;'+
          '&lt;p&gt;Attribution: Uluru, &lt;a href="https://en.wikipedia.org/w/index.php?title=Uluru&amp;oldid=297882194"&gt;'+
          'https://en.wikipedia.org/w/index.php?title=Uluru&lt;/a&gt; '+
          '(last visited June 22, 2009).&lt;/p&gt;'+
          '&lt;/div&gt;'+
          '&lt;/div&gt;';
  
      var infowindow = new google.maps.InfoWindow({
          content: contentString
      });
  
      var marker = new google.maps.Marker({
          position: uluru,
          map: map,
          title: 'Uluru (Ayers Rock)'
      });
      marker.addListener('click', function() {
          infowindow.open(map, marker);
      });
  }
  </code></pre>
  
  <p>Here is the result: <a href="https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple" rel="nofollow">https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple</a> </p>