I put the following algorithm into the login control event. It is fired after the user has logged in. A nuller point exception is thrown.
Answer is updated!! A new exception is thrown, it tells me that cast is not valid
MembershipUser CurrentUser = Membership.GetUser(Login1.UserName,true);
int i = (int)CurrentUser.ProviderUserKey;
I am assuming that this event is only fired if the user successfully logged in, and not failed.. should i use another event or objects. please help!!!
then use