MembershipUser user = Membership.GetUser({UserId}); user.ChangePassword(user.ResetPassword(), {NewPassword});
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Saturday, September 7, 2013
How to reset / change user password programmatically using asp net membership
How to restrict get; setter; to get only inside c# asp net classes
Lets say you have a get, set property inside a class say IP
public String IP { get; }
When I specify get only I wont be able to set the property even inside the class itself. e.g
this.IP = "127.0.0.1";
Property or indexer 'IP' cannot be assigned to -- it is readonlySolution, just type private keyword with set property like this
public String IP { get; private set; }All done
Subscribe to:
Comments (Atom)