database structure

Client Table User Table
ClientId PK| UserId FK| ClientName | Address UserId PK| UserName | Password
int unique indentifier varchar varchar unique identifier varchar varchar
----------------------------------------------------------------------------------------------------
SCENARIO: When a user log in, his client will be displayed and he has the capability to add, edit, or delete records. ( List of clients will be displayed in a gridview, add edit delete will be done by the formview).

PROBLEM: When the user want to insert a new record the UserId field should automatically have the default value of the current logged on user.

please help me!!!!

i THINK THAT WHEN YOU CLICK THE GRID ADD BUTTON TO CREATE A NEW CLIENT YOU MUST FIND THE USERID CONTROL FROM GRID AND THEN SET ITS VALUE AS YOU DESIRED

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.