how to get user data from a logged in user
I have the standard login controls from ASP.NET 2.0 on my site. Now i've added a id field from another table to the aspnet_users table as FK. Now i want to use this ID (if the user is logged in) to populate my datagrid. How can i get this ID? Erik
Check below link
Work With Membership API
HCHaissam Abdul MalakMCAD.NET| Blog |
Hi
Please follow the link
http://forums.asp.net/thread/1702250.aspx
and raise the problem you've meet :) Good luckBest RegardsXiaoYong DaiMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the ...
Logged in user displays user specific data from database
Hi there - I am fairly new to ASP.NET and am hoping for some guidance here ...
I am building an application for manages to track employees as the employee leaves the business. Basically there are processes a line manager is required to complete and I want the manager to enter completion dates when those processes have been completed.
I have gotten as far as successfully creating the login/membership controls. The user (line manager) logs in and is then redirected to the correct page and thats fine. However, I then want for the user to see records from a dat...
display data for a particular logged in user (User.Identity.Name;)
hi, basically i have a database table with:
fileNo, fileName, fileSize, fileType, fileOwner etc
at the minute my grid view displays ALL files for every fileOwner, how does one filter this to only displaying the files which belong to a particular fileOwner who is logged in..
i.e. SELECT * FROM tblFile
WHERE fileOwner = (User.Identity.Name) - to show files for a user who is logged in
how does one do this please?
thanks and regards
Hi,jules
U can Do like thisI am assuming that ur ...
How do I display data in a datagrid specific to the logged in user using the User ID
Hi,
I've got a table that holds user details (such as age, location etc). This table is linked to a user logon details table by the UserID column.
How do I get a datagrid to display the logged on users details? Everything I've read so far uses Username but username isn't a column in my UserDetails table.
I've tried SELECT all from the user details table and using UserID as a session parameter but the datagrid doesn't display so I'm doing something very wrong I think.
The sql statement looks like this:
SELECT UserID, FirstName, Surname, Telephone, Sect...
Session problem(Previous Users log-in details are getting displayed/withheld for the current user)Hi
we've hosted Bugzilla in windows 2000 server & it has been used by many
users at a given time.we've been getting this peculiar Session problem.ie.If
a user logs-in, the page that he visits contains the details of another user
who has just signed out from bugzilla.Any & all suggestions are welcome.
Regards
Tamil
...
Display data for Logged in user
Hi, I am trying to show data from a database where one of the DB field values matches the name of the logged in user. I have LoginName control on the same page so I only want to display data that has a matching value in the DB field.Hope that makes sense? Thanks
Here is what you can do:
Dim uname as String = user.identity.name
if user.identity.isauthenticated then
sqlcmd="SELECT * from db_base Where username='" & uname & "' "
then execute the sqlcmd that is itFun begins at http://www.ovbet.comNow...From the first humanplace
&n...
How do I get profile data before user logs in?
I have a login control. There's profile information
containing a date for when the account will expire. I want to check this every
time the user tries to login. Currently I am using the Authenticate in which does not give me access the profile data because the user isn't yet logged in. How do I go about doing this task? What events, if any, should I override? BTW, I am using a standard membership provider so I can't perform queries. Thanks in advance.
Try this
Profile.GetUser(username).ExpiryDate
CheersRegardsRamzi-------------------------------------------...
Displaying current logged in user data
Hey I been struggling for 3 days on something that just seems so weird ,..why it can be so difficult to achieve????in aspnet_Membership datatable, there's a datafield UserIdI have link that UserId with my datatable called CompanyDetails which also have a UserId..(this is the foreign key) so what Im trying to do is If i know the current user's UserId from the aspnet_Membership datatablethen I will be able to pull his/her datarow from the CompanyDetails database...as simple as thatso I have tried this with my following code...but Sqldatasource does not want to filter ...
Displaying data (formview) only to logged in users
Hi ! I'm trying to display data via a formview only to logged in users. I haven't figured how to do that yet using the session parameter of the objectdatasource. Could anyone help ?Thanks !
Top of the page, clcik the Learn link.
JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
how stupid is that answser. Don't bother replying for this kind of nonsense.
zedisnotyetdead:
I'm trying to display data via a formview only to logged in users. I hav...
How to get data from data base and display it in data grid
hi,am having a connection to data base and now what i want is , how can i display the data from database and display it in my data grid.any sample code of 2 or 3 lines can be of great help. i know how do i get data for a drop down from data base as below.List<CRoleBE> roleList = roleInterface.GetAllRoles();ddlBaseRole.Items.Add(new ListItem("Select any Role", "-1"));foreach (CRoleBE businessEntity in roleList){ ListItem item = new ListItem(businessEntity.Name, businessEntity.ID.ToString()); ddlBaseRole.Items.Add(i...
Display data in a datagrid that is specific to only the logged in user
How do you display data from tables that is based on the logged in username. I know that some post are saying to use the "GetUser" method via Membership. Like for example, I want to display all vendor information for a specific vendor that has logged onto the application in a datagrid? The username in the database is the same as the VendorID. I'm using Visual Studio 2005 and a SQL Server 2005 database.
Any feedback would be greatly appreciated.
Thanks,
rsandes2 (Still a newbie)
Hi,
If your users are logging into website and the login name m...
display data from database accordingly when users log in
the situation is after someone loggs in with his credentials then on his page he should be displayed data relating only to his pageand so and if someone else loggs in on his page his data from the database such as sql server 2005 should be displayedplease helo out if anyone know how to do this in asp,net c#
Hi,aditya
Try This Example
In sql
CReate table register
(id int identity ,[UserName] varchar(20),[Password] varchar(20), varchar(30))
GO
insert into register
Select 'User1','Pass1','Email1'
union all
Select 'User2','Pass2',...
problem in displaying data corresponding to currently logged in user
i am using visual studio 2005 with SQL Express 2005 with VB as the code behindi am using the inbuilt membership and roles to create users and access permissions i am using a formview to display data from a databasedata in formview is displayed corresponding to a parameter passed to iti want that parameter to be the curently logged in username (user.identity.name)how to pass this parameter and where to pass it ?please help me
Hi,
if you're using a DataSource control to bind the FormView control with you can inject the username in the Selecting event.
Grz, KrisRead my blog. Hand...