473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Security Server Controls

I am using the Login, LoginName, LoginStatus and LoginView controls in
my ASP.NET 2.0 website. I need to be able to control user access at a
more fine grained level in my C# code but I can not figure out how to
get the username of the current logged in user. None of the above
controls seem to expose the username as a property. Am I missing
something here is there a special way to get the username?
Jun 27 '08 #1
2 875
The Login Control has a UserName property..

You can also retrieve it by code after login

User.Identity.Name;

--

Jesus Loves You
"n I c H o L a S" wrote:
I am using the Login, LoginName, LoginStatus and LoginView controls in
my ASP.NET 2.0 website. I need to be able to control user access at a
more fine grained level in my C# code but I can not figure out how to
get the username of the current logged in user. None of the above
controls seem to expose the username as a property. Am I missing
something here is there a special way to get the username?
Jun 27 '08 #2
Thanks
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sem K. | last post by:
Hi, I am installing an activex from a web page, for my clients, however, it is possible for users to prevent activex objects in IE. Some percentage of the users, don't see the initial "trust"...
12
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
0
by: wym | last post by:
I have written a web service that provides the following methods: UploadFile SetNTFSSecurity Their purpose is to allow a user to Upload a file to a shared folder with "Everyone" as permission...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
4
by: Nikolay Petrov | last post by:
Hi everyone! I am developing app, which should be used by users, which are members of different groups. These users and groups are stored in my SQL database and are custom for my application,...
1
by: Jeff | last post by:
I am designing a new Windows Forms client application (with SQL Server db on the back end) for which users will authenticate via NT authentication (network), or SQL Server authentication. Users who...
3
by: cityzen.2000 | last post by:
Hello all I have a web page that has a bunch of links implemented in Javascript, each of which calls back to the code-behind page via a Webform_DoCallback call. My problem is this: When I am...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.