Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 26, 2012 01:29 AM by khairiez
Nov 13, 2012 11:34 AM|LINK
My problem is I want to get the userid from default login which is on the database.
I need to build a website which certain user login and the data display only it assigned by the user.
For example, a teacher login and then the data only display for teacher's class.
Nov 13, 2012 11:53 AM|LINK
Nov 13, 2012 01:43 PM|LINK
Nov 20, 2012 02:45 AM|LINK
Sorry for delay reply.
where do i need to put that code?
You can use Membership.GetUser() to get the information for a membership user from the data source at first. Then check the user and select data according to the user as follows:
SqlCommand cmd = new SqlCommand("select LastName from datetable1 ",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
Listview1.DataSource = ds;
Nov 26, 2012 01:29 AM|LINK