I have a file map.aspx which uses querystring to identify which user is which on the map so the first person uses map.aspx?mac=11111 for example.
In map.aspx.cs I have this code to define and initiate the variable.
public partial class map : System.Web.UI.Page
{
...
public static string mac = HttpContext.Current.Request.QueryString["mac"] == null ? "" : HttpContext.Current.Request.QueryString["mac"];
...
}
And on map.aspx there is a jquery ajax that updates the map and it calls the function on map.aspx.cs in intervalls:
[System.Web.Services.WebMethod]
public static string getLocation()
{
...
lots of code and I send mac to the map so I can see the value
...
}
where I use the variable mac in a sql string
finally I have this code in Page_Load:
protected void Page_Load(object sender ...
Go to the complete details ...