1Dynamic bindingDropdownlistPay attention to bindingTextAndValueIS DISPLAYEDText,ProgramExtracted isValue;
2,
Cross joinIs the product of flute Is the number of rows in one table multiplied by the number of rows in the other table.
Left joinThe connection column of the First table does not match in the second table,The value in the second table is returned.Null
Right joinThe join column of the second table does not match in the first table,Returns the value of the first table.Null
Full joinReturns the rows in two tables.Left join + right join
Inner joinReturns matching items for only two table connection 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 ='Starting color'
Endcolorstr ='End color'
Gradienttype = '1' // 1Horizontal gradient,0Position VERTICAL GRADIENT
4, Data Binding array binding
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 ();
ItemtemplateBinding statement
<Asp: boundcolumn datafield = "! "Headertext =" test "/>
<Asp: templatecolumn headertext = "test">
<Itemtemplate>
<% # Container. dataitem %>
</Itemtemplate>
</ASP: templatecolumn>
5, Data BindingHashtableBind
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 ();
ItemtemplateBinding statement
<Itemtemplate>
'>
<Br> <% # databinder. eval (container. dataitem, "key") %>
</Itemtemplate>
6, Simple PagingCode
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
7Modify information based on the associated table
-----Modify information by 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,Cmd. executescalarThe returned value may beNullIn this case, convert itTostring ()This will cause an error. Pay attention to this.
Posted onSmile Read(191)Comment(9)Edit Favorites Reference Network Abstract Category:Original world
Comment
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
9 , Reinstall a few days ago Windows 2003 System. Do Web Service !! Complete installation IIS The website cannot run! Appears " Requesting resource in use " ! However Html Yes!
Error cause:
1 Server-installed stand-alone anti-virus software, such as rising 2005 . The use of the single-host version on the server is generally not stable.
2 Because IWAM Account on Active Directory , IIS metabase Databases and COM + The password of application 3 is not synchronized
3 , Opened the single-host version of the anti-virus script monitoring, resulting in script errors.
Solution:
1 Uninstall the single-host anti-virus software. After restart, install the server version anti-virus software. For example Norton Symantec Antivirus Small and Medium Enterprise Edition.
2 , Run Regsvr32 jscript. dll And Regsvr32 VBScript. dll Register again Java Script and VB Dynamic Link Library of scripts ReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
10Note in binding controls
Chklsthouse. datasource = dbnew. databasebind ("select * From tpstorehouse ");
Chklsthouse. datatextfield = "hname ";
Chklsthouse. datavaluefield = "houseid ";
Chklsthouse. databind ();
You cannot setDatabind ();Written inDatatextfieldBefore, pay attention to the page execution orderReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
11Reasonable UseInsertTo add control data
Dropdownlist1.items. insert (INT index, new listitem (string text, string value ));
Instance:
Dropdownlist1.items. insert (0, new listitem ("Administrator"," 0 "));
12, BackgroundTableAddDropdownlistAndDropControl to add data
//Add row object
Tablerow Myr = new tablerow ();
//Add column object
Tablecell YY = new tablecell ();
//Add a drop-down box object
Dropdownlist myddl = new dropdownlist ();
Myddl. Items. insert (0, new listitem ("Add1", "0 "));
Myddl. Items. insert (0, new listitem ("Add2", "1 "));
//Add the above object
ACC. Controls. Add (myddl );
Myr. Controls. Add (ACC );
//Add the row object to the table.
This. table1.controls. Add (Myr );
Note:,Objects added in the background,The status cannot be automatically maintained.,After each page submission,The status will be saved only once you add it again.,However, the value cannot be re-assigned after being re-added.,Otherwise, the last selection result will disappear.ReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
13Always closeConnectionAndDatareader,Rational UseUsing
Complete pairConnectionOrDatareaderAfter the object is used, it is always explicitly disabled. Although garbage collection eventually clears objects and releases connections and other managed resources, garbage collection is only executed as needed. Therefore, it is still your responsibility to ensure that any valuable resources are explicitly released. In addition, no explicitly closedConnectionsIt may not be returned to the pool. For example, a connection that has exceeded the range but has not been explicitly closed will be returned to the connection pool only when the pool size reaches the maximum and the connection is still valid.
Note Do notFinalizeMethodConnection,DatareaderOr any other managed object callCloseOrDispose. At the end of the process, only the unmanaged resources directly owned by the class will be released. If the class does not have any unmanaged resources, do not include them in the class definition.FinalizeMethod.
InC #Used in"Using"Statement
for C # programmers, make sure that you always close a convenient method for connection and datareader objects the using statement is used. using when a statement leaves its own scope, it automatically calls the use " Object / span> dispose . Example:
// C #
String connstring = "Data Source = localhost; Integrated Security = sspi; initial catalog = northwind ;";
Using (sqlconnection conn = new sqlconnection (connstring ))
{
Sqlcommand cmd = conn. createcommand ();
Cmd. commandtext = "select customerid, companyName from customers ";
Conn. open ();
Using (sqldatareader DR = cmd. executereader ())
{
While (dr. Read ())
Console. writeline ("{0} \ t {1}", dr. getstring (0), dr. getstring (1 ));
}
}
UsingStatement cannot be usedMicrosoftLuVisual BasicLu. Net.
ReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
14, Cannot be createdWebProject
Http://www.java-asp.net/aspnet/200508/t_13510.htmlReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
15,QqLink
<A target = blank href =Http://wpa.qq.com/msgrd? V = 1 & uin = 13886793 & Site = http://www.cnblogs.com/skylaugh&Menu=yes> Border = "0" src =Http://wpa.qq.com/pa? P =Alt ="Click here to send me a message"> </A>ReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile
16When inserting a record in the detail table, do not execute it in the master tableSelect max (ID)This is a common error. When two users insert data at the same time, this will cause an error. You can useScope_identity,Ident_currentAnd@ Identity. If possible, do not use@ IdentityIn the case of a trigger, it will cause some problems (see the discussion here ).
ReplyMore Comments
#Re:Accumulated experience in errors,BugLooking for development, improving in summarySmile