1. When binding dropdownlist dynamically, you must bind text and value. Text is displayed and value is extracted from the program;
2,
Cross join is the product of the flute, that is, the number of rows in one table multiplied by the number of rows in the other table.
Left join: The join column of the First table does not match in the second table. The value in the second table returns NULL.
Right join the join column of the second table does not match in the first table. Yes, the value in the first table returns NULL.
Full join returns the rows left join + right join in the two tables.
Inner join returns only matching items for the two table join columns.
3. Gradient style Microsoft version-Great
<TD style = "filter: progid: DXImageTransform. microsoft. gradient (startcolorstr = '#336699', endcolorstr = '# ffff', gradienttype = '1') "valign =" TOP "align =" center "> See the results. |
Startcolorstr = 'start color'
Endcolorstr = 'end color'
Gradienttype = '1' // 1 is a horizontal gradient, 0 VERTICAL GRADIENT
4. Data Binding to Arrays
1>
Arraylist values = new arraylist ();
Values. Add ("Beijing ");
Values. Add ("Shanghai ");
Values. Add ("Guangzhou ");
Listbox1.datasource = values;
Listbox1.databind ();
2>
String [] arrs = "AA, BB, cc". Split (',');
This. datagrid1.datasource = arrs;
This. datagrid1.databind ();
Itemtemplate binding statement
<Asp: boundcolumn datafield = "! "Headertext =" test "/>
<Asp: templatecolumn headertext = "test">
<Itemtemplate>
<% # Container. dataitem %>
</Itemtemplate>
</ASP: templatecolumn>
5. Data Binding-hashtable binding
1>
Hashtable hash = new hashtable ();
Hash. Add ("Beijing", "010 ");
Hash. Add ("Guangzhou", "020 ");
Hash. Add ("Shanghai", "021 ");
Hash. Add ("Tianjin", "022 ");
Radiobuttonlist1.datasource = hash;
Radiobuttonlist1.datatextfield = "key ";
Radiobuttonlist1.datavaluefield = "value ";
Radiobuttonlist1.databind ();
2> (applicable to multiple images of a product)
Hashtable hash = new hashtable ();
Hash. Add ("002", "propic/2.jpg ");
Hash. Add ("001", "propic/1.jpg ");
Hash. Add ("003", "propic/3.jpg ");
Datalist1.datasource = hash;
Datalist1.databind ();
Itemtemplate binding statement
<Itemtemplate>
'>
<Br> <% # databinder. eval (container. dataitem, "key") %>
</Itemtemplate>
6. Simple paging code
Step 1: obtain its ranking in data by encoding
Select count (*) from tpdetail where ID> (select ID from tpdetail where pnum = '000000 ')
Step 2: Paging by rank
Select top 1 * from (select Top 4 * From tpdetail order by id desc) as a order by ID ASC
7. Modify information based on the joined table
----- Modify the information and modify the information according to the size.
Update tpmstorage
Set xxs2435 = stotrue from tpmstorage inner join
Tpstorage on tpmstorage. stonum = tpstorage. stonum and
Tpmstorage. stocolor = tpstorage. stocolor where stospec = 'xxs' or stospec = '24' or (stospec = '35' and substring (tpstorage. stonum, 1, 2) = '21 ')
8. the return value of CMD. executescalar may be null. If you want to convert it to tostring (), an error will occur. Pay attention to this.