C# »Ø¹ö
private void save_db(){
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings[""].ToString());
SqlCommand comm = new SqlCommand();
conn.Open();
SqlTransaction rollbk2= conn.BeginTransaction();
comm.Connection=conn;
comm.Transaction=rollbk2;
try
{
for(i){
comm.CommandText="insert into ";
comm.ExecuteNonQuery();
}
rollbk2.Commit();
}
catch(Exception exp)
{
rollbk2.Rollback();
Response.Write("save_fail");
return;
}
finally
{
conn.Close();
}
Response.Write("save_ok");
}
Ïà¹ØÎĵµ£º
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.config ÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ý.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄWeb.configÎļþ£¬°üÀ¨Ä¬ÈÏ ......
XmlDocument doc = new XmlDocument();
XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
doc.AppendChild(dec);
//´´½¨Ò»¸ö¸ù½Úµã£¨Ò»¼¶£©
XmlElement root = doc.CreateElement("First");
doc.AppendChild(root);
//´´½¨½Úµã£ ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......
²Î¿¼×ÊÁÏ£ºhttp://wenwen.soso.com/z/q39607884.htm
ÈçºÎÔÚÒ»¸ö´°ÌåÖе÷ÓÃÁíÒ»¸ö´°ÌåµÄ¿Ø¼þ»ò·½·¨
´ð°¸ÊÇ´Ó¹¹Ô캯ÊýÖд«µÝ²ÎÊý¡£
Òª°ÑForm1ÖеĿؼä¸Ä³ÉpublicÊôÐÔ
¾ßÌåʵÏÖ¹ý³ÌÇë²Î¿´Ò»Ï´úÂë(ÔÚform2µÄtextbox1ÖÐÊäÈëÈ»ºóÔÚform1ÖеÄlabel1ÖÐÏÔʾtextboxÖеÄÄÚÈÝ
//form1´úÂë,form1ÖÐÓÐÒ»¸ölabel1ºÍÒ»¸öbutton1,Æä ......
C#ʵÏÖWindows FormµÄ͸Ã÷±³¾°ÓÃÏÂÃæÕâ¶Î´úÂëÄÜʵÏַdz£ÓÐÒâ˼ÕæÕýµÄ͸Ã÷±³¾°£¬Í¸Ã÷µÄµØ·½²»½öÄÜÏÔʾÆäÏÂÒ»²ãµÄͼ°¸£¬¶øÇÒÄÜÈÃÊó±ê´©Ô½¹ýÈ¥£¬³ÉΪÕæÕýµÄ͸Ã÷»¯¡£
×¢Ê͵ôµÄ3ÐÐÖÐ,Ç°2ÐдúÂëÊÇʵÏÖ͸Ã÷Ч¹ûµÄÁíÍâµÚÒ»¸ö°ì·¨£¬×îºó1ÐÐÊǵÚÈýÖÖ°ì·¨¡£
µ«µÚÒ»¸ö·½·¨¸ù±¾²»Æð×÷Óã¬ÒòΪWindows FormËùÓÓµ÷É«°å”ÊÇ&l ......