0

Hi I have a system that allows users to create an account. Theres then an admin side so that if users accounts get locked admin can go on to the unlockuser page where there will be a gridview listing all accounts that are locked out. On each row will be an unlock button, in the back end code I'm using the gridview row command where I have the membershipUser usr = membership.GetUser(); usr.UnlockUser(); All I want to know is what do I put in membershipUser usr = membership.GetUser(); Do I need to create a variable? This has already been created for the gridview in the business layer, I have int32 userID so is this what I put in ()? When i do it appears with a red line, so do I need to declare it in the back end code aswell?

Thanks in advance

2
Contributors
1
Reply
25
Views
3 Years
Discussion Span
Last Post by LastMitch
0

This has already been created for the gridview in the business layer, I have int32 userID so is this what I put in ()? When i do it appears with a red line, so do I need to declare it in the back end code aswell?

You can try this it's something you can start on (I don't know your variable so this is the just the beginning part):

private membershipUser usr RegisteredUsers = membership.GetUser(); 

     membershipUser usr myuser = membership.GetUser(); 

public void RefreshGridview()
{
    gUsers.DataSource = membership.GetUser(); 
    gUsers.DataBind();
}

protected void Page_Load(object sender, EventArgs e)
{
    btn_Delete.Visible = false;

    if (!IsPostBack)

    {

        lblNumberUsers.Text = membership.NumberUsersOnline().ToString();
        lblTotalUsers.Text = RegisteredUsers.Count.ToString();
        string[] alph = "A;B;C;D;E;F;G;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;All".Split(';');

        rptAlphBar.DataSource = alph;
        rptAlphBar.DataBind();
    }
}

Edited by LastMitch: grammer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.