Hey Guys,
I am using the sqlmembershipprovider and need a little code help can't seem to get it to work to promote roles. Ramesh866 provided me the code I the time a thought I was using the standard membership provider now I can't figure out how to use the code with the sqlmembershipprovider.
The problem lies with this line of code MembershipUser us = SqlMembershipProvider.GetUser();
protected void LoginButton_Click(object sender, EventArgs e)
{
MembershipUser us = SqlMembershipProvider.GetUser();
DateTime t1 = us.CreationDate;
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2.Subtract(t1);
double totalh = diff.TotalDays;
if (totalh > 90 && totalh < 180 && Roles.IsUserInRole("Premier Martial Arts Licensing") == true)
{
Roles.AddUserToRole(us.UserName, " ...
Go to the complete details ...