Using Dreamweaver to implement user registration

Source: Internet
Author: User

 基本页面设计

6.1.1 Template bkblog.dwt.aspx Page modification

(1) Open the template bkblog.dwt.aspx, insert Table Lefttab in the left column, insert form yhlogfrm in the first row, insert Table Logtab in form yhlogfrm, and insert the relevant text box, text area, and buttons, as shown in results 6-1-1:
Enter a picture description here
Figure 6-1-1 User Login Design in template

(2) Name the corresponding text box of the author as logname; name the corresponding text box of the password as Logpass and type to password; " Register button to "None" and change the "login" button to "submit Form".

(3) Select the button "Register" button, in the "Behaviors" panel, add the behavior to go to the URL, in the popup dialog box, enter the link as "... /yhinlog.aspx "6-1-2 shows:

Figure 6-1-2 Adding the go to URL behavior

(4) Save the template and update all the pages.

Design of 6.1.2 Registration page

(1) Create a new ASP. NET VB dynamic page yhinlog.aspx generated by the template bkblog.dwt.aspx, insert the form yhinfrm in the mainbody editable region, insert the table Yhinlog, and proceed with the design, as shown in results 6-1-3:

Figure 6-1-3 table Yhinlog Design

(2) Select the corresponding text box of the user name, switch to the label panel, expand "css/Accessibility", enter yhname in the ID, expand "Uncategorized", enter Runat,server, change the yhname text box to server control, 6-1-4:

Figure 6-1-4 Modifying a text box label

(3) and so on, the password corresponding text box named Yhpass, Password and then confirm the corresponding text box named REPASS,QQ code corresponding text box named Yhqq,email corresponding text box named Yhemail, the home page corresponding text box named Yhindex, Change all text boxes to server controls.

(4) Select the form yhinfrm and change it to a server control and save the yhinlog.aspx.

6.1.3 completing the design of the registration page

(1) Create a new Dynamic Dynamic Web page yhlogok.aspx by template bkblog.dwt.aspx, insert the table Logok in the mainbody editable region with three rows and columns, enter the text "Welcome" in the second row, and click "Bind data" in the ASP. Then click on "trimmed form elements" and move the cursor to the position shown in 6-1-5 and enter "Yhname".

\

Figure 6-1-5 Inserting a trimmed form element

(2) Return to the Design view, continue to enter the text "donking ' s blog!", and, for the table Logok, for the design, results 6-1-6 are as follows:

Figure 6-1-6 table Logok Design

(3) Select the button "Home" button, in the "Behaviors" panel, add the behavior to the URL, in the popup dialog box, enter the link as "index.aspx", Save yhlogok.aspx

6.2 Verifying User Registration

In order to prevent the user from entering the wrong registration information, the user registration information should be standardized and verified.

(1) Open the yhinlog.aspx, open the ASP. NET shortcut menu, click on "More Labels", 6-2-1 shows:

Figure 6-2-1 ASP. NET shortcut menu

(2) in the pop-up tag Selector, expand "ASP." → "Verify server Control", select "Asp:requiredfieldvalidator" in the right window frame, click "Insert" button, as shown in 6-2-2

Figure 6-2-2 Tag Selector

(3) in the pop-up tag editor, add validation controls for the text box yhname, and fill in the items 6-2-3 as shown:

Figure 6-2-3 RequiredFieldValidator Tag Editor

(4) Open the tag Selector, insert the ASP. NET validation server control →comparevalidator control, add the validation control for the text box Yhpass to the Repass text box, and fill in the information 6-2-4 as shown:

Figure 6-2-4 Comparevalidato Tag Editor

(5) Insert the ASP. NET validation server control →rangevalidator control, add validation controls for the text box yhqq, and fill in the information 6-2-5 as shown:

Figure 6-2-5 Range Validator Tag Editor

(6) Insert the ASP. NET validation server control →regularexpressionvalidator control, add validation controls for the text box Yhemail, and fill in 6-2-6, where the validation expression is: \w+ ([-+.] \w+)@\w+ ([-.] \w+). \w+ ([-.] \w+) *
(8) Another validation control should be done to prevent duplicate user names registered by the user.

① Add DataSet Yhinlog, set to filter, filter field yhname, parameter variable is the yhname of the form variable to which it is set, as shown in 6-2-8:

(9) Save yhinlog.aspx, browse in IE, if there is a dialog box shown in Figure 6-2-10, which shows that the Dklog site root directory does not have subdirectories aspnet_client, there is no validation control necessary JS script library. This is in the installation. NET Framework, the installer has replicated at the default site, c \ Under the root directory of inetpub\wwwroot, copy c \ Inetpub\Wwwroot subdirectories aspnet_client to the Dkblog site root, OK!

6.3 Add "Insert Record" server behavior

(1) Open yhinlog.aspx, add the "Insert Record" server behavior, the data about the form is added to the data table YH, its settings 6-3-1 are as follows:

Responseencoding= "gb2312" This code to delete the line is OK:

(3) Save, browse in IE to submit user registration information, open the YH table in Access, you can find the submitted Chinese information has all become??。 What then? Don't worry, this is because Tasp.net does not support GB2312 encoding transmission. Open yhinlog.aspx, switch to Code view, find the first line of code:

Change it to:

That is to remove responseencoding= "gb2312". Other Web pages are also modified to prevent errors in the submission of Chinese information.
End

Using Dreamweaver to implement user registration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.