We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,294 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Unlocking a user

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
17 Hours
Discussion Span
2 Months Ago
Last Updated
25
Views
coder91
Junior Poster in Training
94 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 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();
    }
}
LastMitch
Industrious Poster
4,188 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0672 seconds using 2.65MB