CreateUserWizard example: how to create user in asp.net
Here we see how to create a new user in asp.net. Now create a web form name CreateUserWizardExample.aspx and put a CreateUserWizard control. We use this control for easily create user. Here I place the control very simple. But you can customize it as you need. After create a user, you can see successful message and a link to go to home page.
If you face any problem with password, then you use a strong password because asp.net requires strong password for this default setting. Here I use this password gulshanarora@123
Note: you need to configure a provider for store your data. Use Web Site Administration Tool for easily configure it.
CreateUserWizardExample.aspx
Here we see how to create a new user in asp.net. Now create a web form name CreateUserWizardExample.aspx and put a CreateUserWizard control. We use this control for easily create user. Here I place the control very simple. But you can customize it as you need. After create a user, you can see successful message and a link to go to home page.
If you face any problem with password, then you use a strong password because asp.net requires strong password for this default setting. Here I use this password gulshanarora@123
Note: you need to configure a provider for store your data. Use Web Site Administration Tool for easily configure it.
CreateUserWizardExample.aspx
· <%@ Page Language="C#" %>
1.
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3.
4. <script runat="server">
5.
6. </script>
7.
8. <html xmlns="http://www.w3.org/1999/xhtml">
9. <head runat="server">
10. <title>CreateUserWizard example: how to create user in asp.net</title>
11. </head>
12. <body>
13. <form id="form1" runat="server">
14. <div>
15. <asp:CreateUserWizard
16. ID="CreateUserWizard1"
17. runat="server"
18. ContinueButtonType="Link"
19. ContinueButtonText="Go to home page"
20. ContinueDestinationPageUrl="~/Home.aspx"
21. >
22. </asp:CreateUserWizard>
23. </div>
24. </form>
25. </body>
26. </html>
Home.aspx
1. <%@ Page Language="C#" %>
2.
3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4.
5. <script runat="server">
6.
7. </script>
8.
9. <html xmlns="http://www.w3.org/1999/xhtml">
10. <head runat="server">
11. <title>CreateUserWizard example</title>
12. </head>
13. <body>
14. <form id="form1" runat="server">
15. <div>
16. <h1>Home Page</h1>
17. </div>
18. </form>
19. </body>
20. </html>
No comments:
Post a Comment
Your comment is pending for approval