Displaying Username After Logged In?
Sep 21, 2010
I having problem in display the username after a user logged in.This is my master page which has label which named Label1 on top right, i want to display the username on there after logged in.
View 4 Replies
Similar Messages:
Mar 12, 2010
How to update username of current logged username?
View 10 Replies
Dec 2, 2010
I was not able to find the post. I am building an MVC app and on the master page I want to display the user that is logged into the workstation. This is just an internal app so we were just going to use
AD authentication. I am not sure how ISS will be configured on the anonymous or impersionate part so I did this line of code in the master page
<%=Environment.GetEnvironmentVariable("USERNAME") %>
Is this proper and the best way or should I look for a better way. I know this is generic but just curious.
View 2 Replies
Jun 11, 2013
How can I assign logged in windows username as a parameter to sqldatasource in ASP.net web forms.
View 1 Replies
Sep 29, 2010
When a user log into my asp.net site I use the following code:
FormsAuthentication.RedirectFromLoginPage(userid, false);
As I often need to use the userid I can then later get the userid by:
string userid = System.Web.HttpContext.Current.User.Identity.Name;
Now I also want to show the logged in username on each page and my questions is therefore where do I place the username best if I need to use it on every page. User.Identity.Name is already taken by the userid so I can't use that one. Another solution would be to get the username from the database on each page, but that seems like a bad solution.
View 4 Replies
Mar 19, 2010
I want to capture when a user logs in and his username. I am using a login control inside a anonymous temp[late of a login view control. on the logedin event of the login I have this code:
Dim log As Login = CType(sender, Login)
If Not log.UserName = "bcweed@live.ca" Then
Dim mil As MailUtility = New MailUtility
mil.ClientLogin(log.UserName)
End If
but log.username is always empty and so is the page.user.identity.name and the page.user.identity.isauthenticated always returns false this even thouhgt this is the LogedIn event of the login and also I "just loged in" I really did.. is there a way to capture this is the global.asax?
View 4 Replies
Mar 15, 2011
How do I retrieve the UserName for a logged in user? Membership.GetUser().UserName doesn't work for me - Object reference not set to an instance of an object.I need it to get the associated UserID which my own db tables use as primary keyFurthermore, as I am a rookie is the best approach to achieve this through LoggedIn as below?
[Code]...
View 7 Replies
Mar 24, 2010
I have set up security on my ASP.NET site and currently have 1 user (soon to be more!). I would like to send the logged-on user's username to a variable, to input this value to a custom-designed stored procedure on my SQL database (for recording search statistics).Does anyone know how I can harness the current logged-on users username? I am using VB. Will the following achieve the result?session(username)If so, how do I implement this? I tried using "Current_User" in the SQL stored procedure, but obviously this did not record the ASP.NET user. Also, if the current user has not logged onto the site, I would like the "username" value to be "annonymous".
View 10 Replies
Mar 3, 2014
I need client ip and login user name of a system, while using my web application in ASP.Net ....
View 1 Replies
Jul 23, 2012
I have an ASP.NET VB website in which I am using the Membership functionality to authenticate users. I am doing this through the Login control on the HTML page. I have working that it will authenticate the user and then opens a welcome screen in which I have a button they can push to open a Reports.aspx page. On that page I have a dropdown box that is being populated from a datasource connection query to my SQL Server database table. It is a hard coded query but want it to query the table off the username text value that the user provided on the login (i.e. select <something> from inventory where username = <username>). I have not behind code but only HTML at this point. Here it is ...
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[Code] .....
Here is the Reports form that has the dropdown on it:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Report.aspx.vb" Inherits="Report" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
[Code] .....
View 1 Replies
Aug 3, 2010
The project is a default ASP.net Website built in vs 2010. I am new to asp.net and was just experimenting with the master page to only show a menu when logged in.
I have the following in the master page.
[Code]....
The AnonymousTemplate works fine. However when I log into my user the entire menu disappears. I have searched the web and the results were to look at my web config auth tag which looks like this.
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
What am I doing wrong?
PS. I have also tried to set the MENU IDS to the same name and that is not working either.
View 1 Replies
Mar 14, 2010
I have a database called TASKMASTER which holds task related details of all employees and which has a primary key TASK-ID.I also have a table called called employeemaster which holds employee records and which contains username and password as well as the primary key employeeid.employee ID is a foreign key in taskmaster.
Now when i log-in with my username and password it should direct me to a page which shows only tasks assigned to that employee who has logged in...i am using gridview for displaying task records....how do i implement this?
View 2 Replies
Feb 9, 2011
this is basically to show a welcome message [welcome user]on the index page after login in as a registered user of my site. i can achieve this with session but i really want to see this work. i read it in a book. it is not working as i want instead it is displaying my pc's name, instead of showing welcome for the current loggrd in user. put into consideraton that i programmatically created my login controls, my database on sqlserver myself, without asp.net custom login controls.
//this is the label that shows the welcome text
{welcomeLbl.Text = "you are welcome, ";
//user.identity.name+"."; this is suppose to display the name of the current logged in user
welcomeLbl.Text += User.Identity.Name + ".";}
View 2 Replies
Mar 8, 2011
I have issues when developing under Visual Studio 2010 and getting the favicon.ico to display. I have used favicons in production sites (sites running on Windows Server 2008, for example) and have no issues. But when I try to get it to display when testing new code under Visual Studio 2010, then I have difficulties getting it to display. Then sometimes it will display just fine with no assistance (see next paragraph). Before anyone says it...Yes, I have a file in the root directory called "favicon.ico". No, it will not display (in certain projects) when the site is run under VS2010...UNLESS I TREAT THE URL IN THE BROWSER THE SAME AS WHEN RUNNING UNDER FIDDLER2. That is to say, it will only work if I add a period character (.) in the url after the "localhost" entry [URL]. This url will cause the favicon to display every time. If I leave out the period (.), then the favion will not display -- and Fiddler2 will also not display the activity when the page is displayed/refreshed. As I said, this is a sporadic issue. I have some projects where the favicon displays fine. Then I have others where it does not...unless I put the period in the url after the locahost word. Can someone explain to me why:
(a) The period is required in the url to get Fiddler2 to "catch" the activity;
(b) Why does this same phenomenon affect the favicon as well; and,
(C) Why do some projects display the favicon fine when run under VS2010 WITHOUT the period being added?
I just do not understand what the period character in the url string is actually causing to happen and why it doesn't happen when it's missing.
View 1 Replies
Apr 8, 2010
How to keep displaying report filters while displaying the report in CrystalReportViewer.I have a web part that which uses CrystalReportViewer to display the report data. I want to keep displaying the Report parameters (filters) as I rendered the report content.
View 1 Replies
Apr 21, 2010
ASP.Net Page layout is not displaying properly in QA machine but is displaying correctly in Dev Machine. What could be the issue? We are using ASP.Net 2.0
View 1 Replies
Feb 14, 2011
Is it possible to see who is currently logged on?
View 5 Replies
Aug 20, 2010
is there anyway I could create a function that receives and username and the function returns if the user is currently logged in into the application?
View 2 Replies
May 10, 2010
when the user comes to the login page I need to validate whether he is already logged in or not..how I can validate it..can anyone give sample.
View 3 Replies
Oct 25, 2010
I thought this would be a simple task as I am trying to get the current logged in domain user name. I have the following:
[Code]....
but it ALWAYS returns nothing ""
Is there some configuration in the ASP that I have to do first?
View 3 Replies
Mar 24, 2010
I've set up a page where create logins with createuserwizard. I can login with created account but I get logged out after like 20min if I dont do anything (reload etc). How can I remove this timeframe? I dont want a timeframe at all, i want to stay logged in until i close the browser.
View 3 Replies
Jan 2, 2011
I have a Asp Mvc 2 site using forms authentication. When I run it locally I can log in and stay logged in indefinitely.
However when I put it on the server I seem to only stay logged in for a few minutes and then seems to be logged out. I have looked at the cookies and there are 2 which seem relevant:
.ASPXAUTH which is a session cookie .ASPXANONYMOUS which expires in 3 months.
When I refresh the page the cookies stay the same until I get logged out, when I seem to get a new .ASPXANONYMOUS cookie, but the .ASPXAUTH seems to be the same. It seems that I might be able to stay logged in until I do something after a certain amount of time. If I submit a form as soon as I am logged in then it works ok, but if I keep submitting data again and again then after a minute or so, one of the submits will happen as a logged out user and not as the user who was logged in, which all the other submits worked as. What might cause this behaviour and how can I track down what is different & change it so that I can stay logged in indefinitely?
its a single server, but after some more investigation and searching the likely candidate seems to be that I am using more than 100mb on the server and the application pool is getting recycled. I suppose now i need to know How can I check how much memory I'm using. What advice there is to reduce that.
View 2 Replies
Aug 11, 2010
We have got two distinct lists of users that we need to power logged in access to sections of our site.
These lists can't be combined, as one is synced daily to an externally hosted data source, and both tables have to be 100% the same. We have set up two Membership providers onto the site, but my question is, is it possible to allow both to be logged in at the same time?
The issue I find is that HttpContext.Current.User.identity.name contains the username of the last successful logon.
View 3 Replies
Jan 23, 2011
I was trying to incorporate a functionality in my ASP.NET such that a DIV tag which contains the Profile Navigation Menu should only be visible if a person is logged in. I know the condition on how to if the person is logged in or not but wanted to know the method to toggle the div tag on/off based on person's logged in status.
if(loggedin==yes)
{
//?
}
View 3 Replies
Oct 26, 2010
I have <div> with login control on masterpager in header section.
i need code for
if i'm logged in then my <div> should be hide , other wise my login <div>should appear visible
sample
[Code]....
View 6 Replies