Control (8) -- Detailed description of the registration process of the wizard Control

Source: Internet
Author: User

Wizards is a control that provides users with an infrastructure that presents a series of steps. It facilitates navigation settings. Almost all appearance features of this control can be customized through styles and templates, including various buttons and links, titles and headers and footers, toolbar and steps.

The following is an example of today's situation:

First, add a wizard control. First, select a suitable style, and then open "Add/Remove wizardsteps Editor" to add the following five parts:

 

The basic information bar displays:

The text box IDs are tbnname and tbnpws.

 

Detailed information:

The province is followed by a dropdownlist control with ID: ddldf. We will add several provinces in the edit item below. Whether to disclose the details. The following is a radiobuttonlist control with the ID rdbgk:

Hobbies:

Here there are multiple checkboxes, which are very simple. Default ID.

 

Member grade:

The member level is also a dropdownlist control with the ID of ddldj. Then we can add several member options in the edit item.

 

Completed:

There is nothing to introduce here, which is very simple.

 

Background code:

Public partial class kongjian17: system. web. UI. page {// <summary> /// wizard control /// </Summary> /// <Param name = "sender"> </param> // <Param name = "E"> </param> protected void page_load (Object sender, eventargs e) {} protected void wizard1_finishbuttonclick (Object sender, wizardnavigationeventargs e) {string name = "Dear:" + tbname. text; response. write ("<SCRIPT> alert ('" + name + "thank you for registering') </SCRIPT> ") ;} Protected void wizard1_activestepchanged (Object sender, eventargs e) {lblname. Text = tbname. Text; // directly corresponds to the text box or drop-down list. Lblpws. TEXT = tbpws. text; If (rdbgk. selectedvalue = "no") {lblsf. TEXT = "Detailed information hidden by the user"; lblpws. visible = false;} else {lblsf. TEXT = "province:" + ddlsf. selectedvalue; lblphoto. TEXT = "Tel:" + tbpphoto. text;} checkboxlist CBl = (checkboxlist) MB. contenttemplatecontainer. findcontrol ("Chk"); For (INT I = 0; I <CBl. items. count; I ++) {If (CBL. items [I]. selected) {label LBL = new label (); LBL. id = "LBL" + I; LBL. TEXT = CBl. items [I]. text + "<br>"; Ph. controls. add (LBL );}}}}

 

 

The following page is displayed:

 

As for the specific demonstration effect, we will not present it here. Haha, it's similar to the above design, and you will understand it by yourself.

Of course, you can still add more interesting functions to the template. Due to space issues, I will not introduce them much. Let's explore them by yourself.

 

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.