ÎÒ°²×°SQL SERVER2008µÄʱºòÑ¡ÔñWINDOWSÉí·ÝÑéÖ¤Á¬½ÓµÄ£¬ÎÒ²»ÖªµÀÔõôдÁ¬½Ó¡£¡£¡£
»¹ÓÐÎÒÏë¸Ä³ÉSQL SERVERÉí·ÝÑéÖ¤Ôõô¸Ä£¿£¿
лл´ó¼ÒÁË£¡
XML code:
<configuration>
<appSettings>
<add key="ConnectionString" value="Server=·þÎñÆ÷IPµØÖ· ;Initial Catalog=Êý¾Ý¿âÃû³Æ;Integrated Security=True" />
</appSettings>
</configuration>
C# code:
string str = ConfigurationManager.AppSettings["sqlconnection1"];
<configuration>
<appSettings>
<add key="ConnectionString" value="Server=·þÎñÆ÷IPµØÖ· ;Initial Catalog=Êý¾Ý¿âÃû³Æ;Integrated Security=True" />
</appSettings>
</configuration>
¸ü¸ÄµÇ½ÑéÖ¤·½Ê½:
µÇ½SQLºó,Êó±êÓÒ¼üÊý¾Ý¿â,ÊôÐÔ,È»ºóÑ¡Ôñ »ìºÏÑéÖ¤ È·¶¨ÖØÐÂÆô¶¯SQL·þÎñ
ÎÒ¶¼ÊÇÔÚWeb.configÀïÅäÖÃÕâÑùµÄÒ»¶Î»°Á¬½ÓµÄ¡£
</sectionGroup>
</configSections>
<appSettings>
<add key="SQLConnectingString" value="Data Source =.\SQLEXPRESS;database =WaterGrassDB;Integrated Security=SSPI;"/>
</appSettings>
Ïà¹ØÎÊ´ð£º
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
ÕâÑù¿ÉÒÔ·ÖÒ³£¬µ«ÊÇÎÒÔÚºóÃæÏë¼Ó¸öÌõ¼þ
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
ÎÒÔÚ Page_Load ÀïдÁË
if(!IsPostBack){
GridView1.DataSource=GroupManager.GetGroups();//GetGroups ·µ»ØµÄÊÇ IList<Group>
GridView1.DataBind();
}
¿ÉÎÒÔÚ Submit_Click Àïд´ú ......
ÄÄλ´ó¸çÓÐûÓÐASP.NETÖÐÀûÓÃCookiesʵÏÖÓû§×Ô¶¯µÇ¼µÄ´úÂë...ллÁË...Ô½ÏêϸԽºÃ....
ʲôÒâ˼£¿×Ô¶¯µÇ¼£¿
mark òÊÓÊÇ´æ´¢cookies ÎÒÒ²¶Ôcook±È½ÏÃÔºý ¹Ø×¢ÏÂ
¼ÈÈ»ÄãÖªµÀÓÃcookies×Ô¼º¶¯¶¯´óÄÔ¶àºÃ£¡ ......
ÓÃDWдµÄaspxºÍvs C#дµÄÍøÕ¾ÏµÍ³(Ö÷ÒªÒ³ÃæÎļþÒ²ÊÇaspxµÄÎļþ)ÓÐÊ²Ã´Çø±ð,VSдµÄÍøÕ¾·¢²¼ºó,ËùÓеĴúÂ벿·ÖºÏ³ÉÒ»¸öDLLÎļþ,¶øDW¾ÍûÓа취,ÕâÁ½¸ö¹¤¾ßд³öÀ´µÄÍøÕ¾Í¬ÑùÊÇaspxµÄÎļþ,µ«Çø±ðºÜ´ó°¡.
°ïÄã¶¥ÏÂ~£¬Çó ......
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
''' <summary>
'' ......