page is logged in, the CreateDataSource and Bindgrid functions are invoked, the CreateDataSource function connects to the database, and the Dataview,bindgrid function is established to bind the data to the DataGrid. Specific statements about these two functions are described in the code.
Four: Basic database application
With the above template, ASP. NET database application has been the basic framework, now, we need to make some changes in this framework, it is more in line with our actual use
, also use "Span" to enclose it, also give it an "id" Properties, such as: Id= "Image1";
2, in the Web page source code between the 〈head〉 and 〈/head〉 add the following CSS code:
〈style type= "Text/css"〈!--. style1 {position:absolute; top:200px; left:180px;Background-color: #ccccff; Visibility:hidden}. style2 {position:absolute; top:200px; left:180px;Background-color: #ccccff; }. style3 {position:absolute;
use "Span" to enclose it, also give it an "id" Properties, such as: Id= "Image1";
2, in the Web page source code between the 〈head〉 and 〈/head〉 add the following CSS code:
〈style type= "Text/css"
〈!--
. style1 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; Visibility:hidden}
. style2 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; }
. style3 {position:absolute;
"span" to enclose it, and add an "id" to it. attributes, such as: Id= "Image1";
2, in the page source code between 〈head〉 and 〈/head〉 add the following CSS code:
〈style type= "Text/css"
〈!--
. style1 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; Visibility:hidden}
. style2 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; }
. style3 {position:absolute; top:190px;
, also use "Span" to enclose it, also give it an "id" Properties, such as: Id= "Image1";
2, in the Web page source code between the 〈head〉 and 〈/head〉 add the following CSS code:
〈style type= "Text/css"〈!--. style1 {position:absolute; top:200px; left:180px;Background-color: #ccccff; Visibility:hidden}. style2 {position:absolute; top:200px; left:180px;Background-color: #ccccff; }. style3 {position:absolute;
enclose it, also give it an "id" Properties, such as: Id= "Image1";
2, in the Web page source code between the 〈head〉 and 〈/head〉 add the following CSS code:
〈style type="text/css"〉〈!--.style1 { position:absolute; top: 200px; left:180px;background-color:#ccccff; visibility:hidden}.style2 { position:absolute; top: 200px; left:180px;background-color:#ccccff; }.style3 { position:absolute; top: 190px; left:1
enclose it, also give it an "id" Properties, such as: Id= "Image1";
2, in the Web page source code between the 〈head〉 and 〈/head〉 add the following CSS code:
〈style type= "Text/css"
〈!--
. style1 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; Visibility:hidden}
. style2 {position:absolute; top:200px; left:180px;
Background-color: #ccccff; }
. style3 {position:absolute; top:19
Menu | dropdown
For today's avid web design enthusiasts, the monotonous web page effect is far from satisfying their novelty mentality. This article is to introduce a simple pull-down menu of the production. As long as you know a little bit of HTML knowledge, you can. Even if do not understand what, divert also line, hehe.
The first step, define the Drop-down menu JS code
Step two, insert the Directory menu at the appropriate location
bordercolo
The program can be used directly to run through.
----------------------------------------------------Testconstraint.aspx----------------------------------------------------
width=" Backcolor= "#ccccff" bordercolor= "BLACK" Showfooter= "false" cellpadding=3 cellspacing = "0" font-name= "Verdana" font-size= "8pt" headerstyle-backcolor= "#aaaadd" Ondeletecommand = "Mydatagrid_delete" datakeyfield= "SupplierID" >
Width= "8
In ASP. there are two methods to access the SQL Server database in. NET: System. data. oleDb and System. data. sqlClient. the following program uses System. data. sqlClient is used as an example to access the local database server.
First, import the namespace: System. Data and System. Data. SqlClient. For detailed code, see the source program.
Width = "600"BackColor = "# ccccff"BorderColor = "black"ShowFooter = "false"CellPadding = 3CellSpacing = "0"F
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.