Hi
I have two issues they are about the same think just in different spots. The first one I am trying to understand how to get a value at a time when someone logs in. What i have is a table that house user name and passwords what i would like to get is the primary key from that table. I would need to be able to use value to update another table when they click on a row on a datagrid. I have looked into the session value but I don't understand how that works. The value that I want is a interger.
The other issue is that i have screen to allow them to sign up to a webpage. The problem is that I have the user name and passwords on a different table. I am not sure how to get the value back when they add their information. I have attached the code that I have so far for this. I am just not sure how to call the value once it pulls it back.
[OperationContract]
public void InsertMember(Member m)
{
using (AddMemberDataContext amd = new AddMemberDataContext())
{
Member mb = new Member()
{
Fname = m.Fname,
Lname = m.Lname,
City = m.City,
State = m.State,
Addr1 = m.Addr1,
Addr2 = m.Addr2,
Phone = m.Phone,
Zip = m.Zip
};
amd.Members.InsertOnSubmit(mb);
try
{
amd.SubmitChanges();
int mid = mb.MemberID;
}
catch (Exception)
{
throw;
}
}
}