G Guest Feb 2, 2006 #1 hey all, using javascript, how do you get the user id of whose logged in currently? thanks, rodchar
G Guest Feb 2, 2006 #2 You can put the "userId" to the hidden input control and get it using javascript. <body> <form id="form1" runat="server"> <div> <input id="Hidden1" type="hidden" value="<%= HttpContext.Current.User.Identity.Name %>" /></div> <script type="text/javascript"> alert(form1.Hidden1.value); </script> </form> </body> Alexey Borzenkov (http://aspspider.net/snake)
You can put the "userId" to the hidden input control and get it using javascript. <body> <form id="form1" runat="server"> <div> <input id="Hidden1" type="hidden" value="<%= HttpContext.Current.User.Identity.Name %>" /></div> <script type="text/javascript"> alert(form1.Hidden1.value); </script> </form> </body> Alexey Borzenkov (http://aspspider.net/snake)