Ïê½âAsp.Net SqlÊý¾Ý¿âÁ¬½Ó×Ö·û´®
1.Á¬½ÓÊý¾Ý¿âÎļþ
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=true" />
SqlConnectionStringBuilderʵÀý»¯Ê±£¬ÒªÓõ½connectionString£¬È磺SqlConnectionStringBuild builder = new SqlConnectionStringBuild(connectionString)¡£
Ò»¡¢Data Source
SqlConnectionStringBuilderµÄDataSourceÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄData Source£¬“Data Source”¿ÉÒÔÓÉÏÂÁÐ×Ö·û´®´úÌ棺“server”£¬“address”£¬“addr”ºÍ“network address”¡£
Data Source=.\SQLExpressÒ²¿ÉÒÔд³ÉÕâÑùData Source=(local)\SQLExpress¡£
¶þ¡¢Integrated Security
SqlConnectionStringBuilderµÄIntegratedSecurityÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄIntegrated Security£¬“Integrated Security”¿ÉÒÔд³É“trusted_connection”£¬Îªtrueʱ£¬Ê¹Óõ±Ç°µÄ Windows ÕÊ»§Æ¾¾Ý½øÐÐÉí·ÝÑéÖ¤£¬Îªfalseʱ£¬ÐèÒªÔÚÁ¬½ÓÖÐÖ¸¶¨Óû§ ID ºÍÃÜÂë¡£
Èý¡¢AttachDBFilename
SqlConnectionStringBuilderµÄAttachDBFilenameÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄAttachDBFilename£¬“AttachDBFilename”¿ÉÒÔд³É“extended properties”£¬“initial file name”¡£AttachDbFileNameÊôÐÔÖ¸¶¨Á¬½Ó´ò¿ªµÄʱºò¶¯Ì¬¸½¼Óµ½·þÎñÆ÷ÉϵÄÊý¾Ý¿âÎļþµÄλÖá£Õâ¸öÊôÐÔ¿ÉÒÔ½ÓÊÜÊý¾Ý¿âµÄÍêÕû·¾¶ºÍÏà¶Ô·¾¶£¨ÀýÈçʹÓÃ|DataDirectory|Óï·¨£©£¬ÔÚÔËÐÐʱÕâ¸ö·¾¶»á±»Ó¦ÓóÌÐòµÄApp_DataĿ¼Ëù´úÌæ¡£
ÓÐһƪÎÄÕ£¬×¨ÃŽâÊÍDataDirectoryÊÇʲô¡£
ËÄ¡¢User Instance
SqlConnectionStringBuilderµÄUserInstanceÊôÐÔ£¬¶ÔÓ¦connectionStringÖеÄUser Instance ,¸ÃֵָʾÊÇ·ñ½«Á¬½Ó´ÓĬÈ쵀 SQL Server Express ʵÀýÖض¨Ïòµ½ÔÚµ÷Ó÷½ÕÊ»§Ö®ÏÂÔËÐв¢ÇÒÔÚÔËÐÐʱÆô¶¯µÄʵÀý¡£UserInstance=true£¬ÔÚÕâÖÖÇé¿öÏ£¬SQLServerExpressΪÁË°ÑÊý¾Ý¿â¸½¼Óµ½ÐµÄʵÀý£¬½¨Á¢Ò»¸öеĽø³Ì£¬ÔÚ´ò¿ªÁ¬½ÓµÄÓû§Éí·ÝÏÂÔËÐС£ÔÚASP.NETÓ¦ÓóÌÐòÖУ¬Õâ¸öÓû§ÊDZ¾µØµÄASPNETÕʺŻòĬÈϵÄNetworkService£¬ÕâÒÀÀµÓÚ²Ù×÷ϵͳ¡£ÎªÁË°²È«µØ¸½¼Ó·Çϵͳ¹ÜÀíÔ±Õʺţ¨ÀýÈçASP.NETÕʺţ©ÌṩµÄÊý¾Ý¿âÎļþ£¬½¨Á¢Ò»¸ö¶ÀÁ¢µÄSQLServerÓû§ÊµÀýÊDZØÒªµÄ¡£
¸½Â
Ïà¹ØÎĵµ£º
--default-character-set=utf8 ÓëÐÞ¸ÄsqlÎļþ¼ÓÈ룺SET NAMES 'utf8';
µ¼Èë½Å±¾Ê±£¬SET NAMES 'xxx' £¬xxxÓ¦¸ÃºÍsql½Å±¾ÎļþµÄʵ¼Ê±àÂëÒ»Ö£¬Èç¹ûÄãÉèÖõÄʱutf-8 £¬ÄÇôÇëÈ·ÈÏÄãµÄsql½Å±¾Îļþʱutf-8±£´æµÄ:
iconv -f UTF-8 xxx.sql
Èç¹ûÏÔʾÕý³££¬ÄÇôÕâÒ»²½¾ÍOKÁË
ÁíÍâ×¢ÒâÄãµÄ½Å±¾ÀÓÐûÓиø¿â±íÉèÖ ......
¾¹ýÒ»Íí°ë¿àÕ½£¬ÖÕÓÚ½«Discuz NTÓëij¹«Ë¾ÍøÕ¾ÕûºÏÆðÀ´ÁË£¬Æð³õ»¹Óöµ½²»Ð¡ÎÊÌ⣬ºÜ¶à¶¼²»Ã÷°×¡£
½«ÔÚ¸ùij¹«Ë¾ÍøÕ¾¸ùĿ¼ÉϽ¨Ò»¸öBBSÎļþ¼Ð£¬°ÑDiscuz NTµÄÎļþ¶¼·Å½øÀïÃæ¡£
ÔÙ½«DNT.configÎļþ£¬configÎļþ¼Ð£¬aspnet_clientÎļþ¼Ð£¬BinÎļþ¼ÐµÄÄÚÈÝCopyµ½¸ùĿ¼ÖУ¬½«DiscuzNTµÄWeb.ConfigÎļþÓëij¹«Ë¾ÍøÕ¾µÄWeb.ConfigÎ ......
ÔÚIE6ÖÐÕý³££¬µ«ÊÇÔÚIE7Öж϶ÏÐøÐø¡£
Õâ¸öÎÊÌâ¿´ÉÏÈ¥Ó¦¸ÃÊÇIE7ºÍIE6¶ÔstyleÄÚÈݳÊÏÖ²»Í¬µ¼Öµġ£
ÎÊÌâÔÒò£º´ò¿ªTreeviewËùÔÚÒ³ÃæµÄsource code£¨ÔÚIE7ÀïÃæÑ¡ÔñView Source£©£¬´Ëʱ¿ÉÒÔ¿´µ½Treeview³ÊÏÖµ½¿Í»§¶ËºóµÄHTML´úÂ룬ÔÚÕâÀï¿ÉÒÔ¿´µ½TreeView³ÊÏÖµÄHTMLÀïÃæµÚÒ»¸öDivµÄStyleÊôÐÔÖÐÓÐÒ»¸öheight:1px¡£
ÎÊ ......
2009Äê11ÔÂ23ÈÕ ÐÇÆÚÒ» 10:21
ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿· ......
ÖÚËùÖÜÖªASP.NET 2.0Àï¶Ô±¾µØ»¯£¨Localization£©×öÁ˺ܶ๤×÷£¬´ó´ó¼ò»¯ÁË¿ª·¢¹ý³Ì¡£½ñÌìÖÕÓÚÄܳé³öʱ¼äÑо¿Ò»ÏÂÕâ¸ö¼¼ÊõÁË£¬×ÊÁϺܶ࣬µ«´ó¶à´ø×ÅÒ»¹ÉÒ§ÎĽÀ×ֵķÒëζµÀ£¬So......×Ô¼ºÐ´Ò»Æª¡£
1.ʹÓù¤¾ß×Ô¶¯Éú³É±¾µØ»¯×ÊÔ´£¨LocalResources£©
2.ÔÀ´Localizable AttributePropertyÊÇÕâô»ØÊÂѽ
3.ÊÖ¹¤Ìí¼Ó±¾µ ......