Click here to Skip to main content
15,908,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
here is my question my first page is login page in this username password fields are there.if the user login in to the page as admin he redirects to a page where he can perform all admin operations such as creating user and editing him,in my database table 'createdby' column should be updated by the particular admin who created the user.and the admin value i'm getting form the login page through session.
Posted
Updated 17-Jul-12 23:54pm
v2
Comments
dimpledevani 18-Jul-12 5:46am    
I didnt understood anything, Please frame your question properly.
pradiprenushe 18-Jul-12 5:49am    
Whether admin is adding user or add/update user?

1 solution

Hi,

Store the User Id into the session and insert that user id into the "Updated By" columns of the table.
C#
"Session["UserID'] = txtUserId.Text;

AND
C#
string Query = "INSERT INTO YourTable (col1,...,UpdatedBy) VALUES(....,'" + Session["UserID"] + '")";


hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900