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
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
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...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...Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
please tellme how to resolve this error, i m using server studio management tool. and trying to connect using sql server authentication. my pc is over a domain.
Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
check whether that sql server is allowing sqlauthentication or not.select that server -> right click it-> select properties -> in the window, select security -> check what is the server authentication. it should be sqlserver and windows authentica...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.
I'm trying to display data via a formview only to logged in users. I hav...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 ...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#
Try This Example
CReate table register
(id int identity ,[UserName] varchar(20),[Password] varchar(20), varchar(30))
insert into register
Select 'User2','Pass2',...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.
rsandes2 (Still a newbie)
If your users are logging into website and the login name m...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
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...Submit Form to insert data into SQL and display with a gridview (edit as well) below how do i insert data into sql table?
I have an asp.net page that has a simple form where a user can submit customers information. Below that I have a gridview which displays customer information submited by the user who is logged in. I have the gridview displaying, sorting and updating as I want however I can't figure out how to bind a button click to insert data into the customer table and then have it refresh the gridview when they submit. Here is the basic code; (I am using AJAX for a calendar when a user wants to edit an appointment date) <div class="leftBar">
<div align=center&...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 |
Please follow the link
and raise the problem you've meet :) Good luckBest RegardsXiaoYong DaiMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the ...Custom table data display based on current user log in
I am in really need of some help with ASP.net 2.0. I am trying to develop a site that when a user logs in will display only their data in a table or graph. Im using Visual Web Developer 2005 and sqlexpress 2005
I have setup one sql database called Customers.mdf with the table CustomerDetails and the other default aspnetdb.mdf which is created using the Website Admin Tool.
Basically my user login IDs will be CustomerID numbers as in the customer table but when I create a user, for example User ID "1" this is stored in the aspnetdb.mdf. Therefore when I log in as this user I do not ...