‘code template ‘Membership.GeneratePassword(lenghtOfPass, numOfNonAlphaNumChar) ‘code Dim nPassword As String = Membership.GeneratePassword(8, 3) ‘Generates random password like this: &M0Zs[@Y
Archive for the 'Encryption' Category
ASP.NET Login Page with SQL Backend
Let’s start simple by creating form controls: <table> <tr><td>Usernname</td><td><asp:TextBox ID=”user” runat=”server”></asp:TextBox></td></tr> <tr><td>Password</td><td><asp:TextBox ID=”password” runat=”server” TextMode=”Password”></asp:TextBox></td></tr> <tr><td></td><td><asp:Button ID=”Button1″ OnClick=”submit” Text=”Login” runat=”server” causesValidation=”true” /></td></tr> </table> Now add some form validation: <table> <tr><td>Usernname</td><td><asp:TextBox ID=”user” runat=”server”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”user” ValidationGroup=”UserCheck” ErrorMessage=” <font color=’red’> « Username is required!</font> “> </asp:RequiredFieldValidator> </td></tr> <tr><td>Password</td><td><asp:TextBox ID=”password” runat=”server” TextMode=”Password”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator2″ runat=”server” ControlToValidate=”password” […]