Quick development Tips-working with data-bound controls
Combining instance Datatest
In the Login.aspx:
1. Validation control RequiredFieldValidator
The error message displayed by display:dynamic changes with the layout of the page and is not fixed
ErrorMessage: Error message displayed
ControlToValidate: The control ID to validate
2. In the login.aspx I set the username and password input can not be empty, when clicked "Login" after entering datalist.aspx
When you click on the "Register" button, the validation control also appears, at which point we need to set the group: the validation control, the button set to a group.
The method is to validate the validationgroup in the control, the button: set to the same number. I'm 111 here.
3. Data binding
Select "Where"
Bind the username,pwd to Textbox1,textbox2, respectively.
"Add"-"OK". Over ....
In the register.aspx:
1. Use FormView to quickly develop the registration page
Binding Data Source First ...
The FormView control provides three sets of templates, namely, display, update, insert
Because this is a new user to register, insert a record.
1 Select FormView Edit Template, use "InsertItemTemplate"
2) FormView automatically displays the columns of the data source in the template, making changes as needed:
A Listed as English à Chinese
B Sex: Using rediobuttonlist, there must be a check
RepeatDirection: Sets the rediobuttonlist layout direction, horizontal is the horizontal layout.
To insert a value into a database, you also need to bind.
"Edit DataBindings"
Note: "Bind to (B)": Select the field for the data table to bind to;
Bidirectional data binding is both readable and writable.
Attention:
1) Judge FormView as inserting mode
protected void Page_Load (object sender, EventArgs e)
{
Formview1.defaultmode = Formviewmode.insert;
}
2) to determine the insertion success
protected void formview1_iteminserted (object sender, Formviewinsertedeventargs e)
{
if (e.affectedrows = = 1)//The number of affected bars is one, the insert succeeds
{
Response.Write ("registered success");
}
}
In the datalist.aspx:
1. Binding Data Sources first
2. Use the GridView to quickly display and edit data and delete
Note: The data from the BoundField data source must be in the selected fields, if you want to show that you can use the field's "Showheader" setting to False, and "Visible" set to false.
When you want to implement the function of the navigation column, I am here to implement "click User Name", enter the record detail page detail.aspx
Method:
1 Delete bound column "User name",
2 new "HyperLinkField", the following figure to set:
In the detail.aspx:
1. Bound data source
2. Edit Template
By default, FormView is rendered in the form of data displayed without setting.
SQL Server Database Engine:
The Microsoft SQL Server 2005 Database engine is a core service for storing, processing, and guaranteeing data security. The database engine provides control access and rapid transaction processing to meet the requirements of the enterprise's most data-consuming applications. The database engine also provides a great deal of support for maintaining high availability.
The database engine is the database we understand in the traditional sense.
Here, you need to understand the meaning of the SQL Server 2005 data platform:
SQL Server 2005 incorporates a large number of data Analysis Services in addition to the database, as shown in the previous illustration:
1) Database Engine
2) Analysis Services
3) Integration Services
4) Copy
5) Reporting Services
6) Notification Service
7) Service Agent
8 Full-Text Search
Document and instance code download address