Hey there,
Here is a suggestion:
You can use your
SignIn(txt_username.Value, txt_pass.Value)
to return the
User
record from Table in a DataTable if the login is successful.
This way you,ll be able to get both
UserTypeID
and
UserID
related to the current user.
Hence, you can save these two fields in the
Session
object, suppose
dt
is the returned DataTable e.g.
Session["UserID"] = dt.Rows[0]["UserID"].ToString();
and when you want to use this UserID at the time of saving document records, you can do this to get the UserID from Session.
if(Session["UserID"] != null)
{
long UserID = Convert.ToInt64(Session["UserID"].ToString());
}
Hope it helps.
Azee...