Hii,
I want to get the User Name of my window form application in C# from the list of registered user name in my database Login list, not the Windows user name.
Please tell me.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sunny SharmaPosted May 28, 2013, 1:30 AM
Don't worry... please share your code what you've tried so far. I want to see how you've implemented the authentication to help you with.
Thanks.
William AnthonyPosted May 28, 2013, 1:44 AM
Sunny SharmaPosted May 28, 2013, 1:36 AM
William AnthonyPosted May 28, 2013, 1:25 AM
Thanks
Sunny SharmaPosted May 28, 2013, 1:18 AM
As you said, you're using a database having login credentials. If I'm not wrong then the user name must be there. I suggest to assign it to a variable like "CurrentUser" at meantime you've successfully authenticated the user.
If you're using ASP.NET Memebership provider to provide Authentication and Authorization and want to get the current user name use the code below:
William AnthonyPosted May 28, 2013, 1:09 AM
Sunny SharmaPosted May 28, 2013, 12:58 AM
Pankaj PandeyPosted May 28, 2013, 12:53 AM
please explain your need a little more