Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / June 2007

Tip: Looking for answers? Try searching our database.

finding User.Identity in a control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yankee Imperialist Dog - 20 Jun 2007 19:49 GMT
What is the correct or best way to find and reference the User.Identity.
I'm creating a control to handle login functions for a site.

(need more flexability than the builting one)
Thanks
KES

Signature

Share The Knowledge. I need all the help I can get and so do you!

David R. Longnecker - 20 Jun 2007 20:40 GMT
KES-

By "find and reference" could you provide a bit more detail on how you're
using it?

By adding a reference to System.Web.Security in your using (or Inherits)
statements, using the User object is as easy as:

lblUserName.Text = User.Identity.Name;

Now, are you wanting other features (you mentioned needing more flexibility)
such as Active Directory lookups and such out of the object or ... ?

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

YD> What is the correct or best way to find and reference the
YD> User.Identity. I'm creating a control to handle login functions for
YD> a site.
YD>
YD> (need more flexability than the builting one)
YD> Thanks
YD> KE
Yankee Imperialist Dog - 20 Jun 2007 21:05 GMT
ok i got the answere real fast
If Me.Page.User.Identity.IsAuthenticated Then ....

Signature

Share The Knowledge. I need all the help I can get and so do you!

> What is the correct or best way to find and reference the User.Identity.
> I'm creating a control to handle login functions for a site.
>
> (need more flexability than the builting one)
> Thanks
> KES

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.