Hello.
Im trying to make something similar to the first code in:
Loading a map based on the logged in user.
Im planning on just modifying the current NetworkMapView.ascx.cs
I'm wondering how to get the currently user logged in(Who also visited the view)?
Then it whould be simple:
Just remove the edit button and change orginal code:
if (!string.IsNullOrEmpty(Resource.Properties["selectedMapId"]))
{ NetworkMapControl1.MapId = Resource.Properties["selectedMapId"]; } else { NetworkMapControl1.MapId = "Sample Map"; }
to:
if (!string.IsNullOrEmpty(Resource.Properties["selectedMapId"])) { NetworkMapControl1.MapId = Resource.Properties["selectedMapId"]; } else { if ((Session("somevalue") != null)) { myvalue = httpContext.Current.Session("AccountID").ToString(); } NetworkMapControl1.MapId = myvalue; }
Since the edit button is removed, the user cant select a map, and then it normally picks the standard map, but instead my intension of the code was to display a map, with the same name as the user who visited the view.
It most be possible to get the user who visited the page, but how?