title: How could i reach textBox value in ajax method?
body: <p>I have two problem. First one, when i click Log In button, localhost wants to me give allow. but it suddenly disappear in one second. if i double click, it always shows in the bottom like this. then Ajax method run. i want to show this windows always in one click.</p>
  
  <p>My second problem, i want to reach txtUserName in ajax method. i don't know how to this.</p>
  
  <p><img src="https://i.stack.imgur.com/VpzeU.png" alt="error"></p>
  
  <p>Code Behind :</p>
  
  <pre><code>[System.Web.Services.WebMethod]
      public static string SendLocation(object Latitude, object Longitude)
      {
          Core dal_ = new Core();
          Model.Team obj_ = new Model.Team();
  
          //obj_.UserName = ?????
          obj_.Latitude = Convert.ToDecimal(Latitude);
          obj_.Longitude = Convert.ToDecimal(Longitude);
  
          dal_.UpdateTeamCoordinat(obj_);
          return "";
      }
  </code></pre>
  
  <p>JavaScript (in asp.x) :</p>
  
  <pre><code>   &lt;script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="js/yqlgeo.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      function initiate_geolocation() {
          if (navigator.geolocation) {
              navigator.geolocation.getCurrentPosition(handle_geolocation_query, handle_errors);
          }
          else {
              yqlgeo.get('visitor', normalize_yql_response);
          }
      }
  
      function handle_errors(error) {
          switch (error.code) {
              case error.PERMISSION_DENIED: alert("user did not share geolocation data");
                  break;
  
              case error.POSITION_UNAVAILABLE: alert("could not detect current position");
                  break;
  
              case error.TIMEOUT: alert("retrieving position timedout");
                  break;
  
              default: alert("unknown error");
                  break;
          }
      }
  
      function normalize_yql_response(response) {
          if (response.error) {
              var error = { code: 0 };
              handle_error(error);
              return;
          }
  
          var position = {
              coords:
          {
              latitude: response.place.centroid.latitude,
              longitude: response.place.centroid.longitude
          },
              address:
          {
              city: response.place.locality2.content,
              region: response.place.admin1.content,
              country: response.place.country.content
          }
          };
          handle_geolocation_query(position);     
      }
  
      function handle_geolocation_query(position) {
          PageMethods.SendLocation(position.coords.latitude, position.coords.longitude);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Asp.x:</p>
  
  <pre><code>  &lt;asp:TextBox ID="txtUserName" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;asp:TextBox ID="txtPassword" runat="server" TextMode="Password"&gt;&lt;/asp:TextBox&gt;
    &lt;asp:Button ID="LoginButton" runat="server" Text="Log In"    OnClientClick="initiate_geolocation()"
                  OnClick="LoginButton_Click" /&gt;
  </code></pre>