Getting the membership username

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have implemented asp.net membership in my app. How can I get the name of
the currently logged user?

Thanks

Regards
 
Hi Munna

Thanks. I am trying to do it in the SqlDataSource in a gridview. Not sure
how to do it in this context.

<asp:SqlDataSource ID="EventsSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:Events %>"
SelectCommand="SELECT * FROM [MyTable] WHERE [Username]
= Me.User.Identity.Name"></asp:SqlDataSource>

Thanks again.

Regards
 
Back
Top