How to display the username of a user after successful login in google maps v3 c#? -
i'm working on tracking system project in asp.net c#. i've implemented login section , made use of "session" track users. have map (google map v3) being displayed on homepage shows user his/her current location after successful login. want retrieve value of username , display on map. i've tried keep value of username in html element , try access javascript alas! didn't work! appreciated.
expose username through webmethod in c# , grab when generate marker using ajax. similar this:
function grabuser() { $.ajax({ type: "post", url: urltomethod, data: "{}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (msg) { alert(msg.d); } }); } [system.web.services.webmethod] public static string user() { return username; }
Comments
Post a Comment