Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.netÒ³ÃæʵÏÖMSSQLÊý¾Ý¿âµÄ´´½¨ºÍ²Ù×÷£¬ÊÇ¿â´´½¨£¡

///   <summary>  
        ///   ´´½¨Êý¾Ý¿â¡£  
        ///   </summary>
        ///   <param name="srvName">±íʾҪÁ¬½ÓµÄ·þÎñÆ÷Ãû</param>
        ///   <param name="dbName">Ö¸¶¨Òª´´½¨µÄÊý¾Ý¿âÃû</param>
        private string CreateDB(string srvName, string dbName)
        {
            SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass();
            SQLDMO.SQLServer srv = new SQLDMO.SQLServerClass();
            srv.Connect(srvName, "sa", "");
            // н¨Êý¾Ý¿âÃû(°üÀ¨Â·¾¶)
            string dbPath = srv.Registry.SQLDataRoot + "\\DATA\\" + dbName;
            bool DBExist = false;
            foreach (SQLDMO.Database db in srv.Databases)
            {
                if (db.Name == dbName)
                {
                    DBExist = true;
                }
            }
       &nbs


Ïà¹ØÎĵµ£º

asp.net DBHelp.cs

 
 public class DBHelper
    {
        private static SqlConnection connection;
        public static SqlConnection Connection
        {
    &nb ......

ASP.NET×Ô¶¨Òå´íÎóÒ³Ãæ

1¡¢Ìí¼ÓWeb.config£¬ < system.web>< /system.web>ÖÐÌí¼Ó< customErrors mode="On"
defaultRedirect="ApplicationErroy.aspx" >< /customErrors>½Úµã£¬
2¡¢Ìí¼ÓGlobal.asaxÎļþ£¬ÕÒµ½Application_Errorʼþ£¬¼ÓÈëÒÔÏ´úÂ룺   
//ÕâÊÇÌí¼ÓÁËÒ»¸öÈ«¾ÖÓ¦ÓÃ³Ì ......

ASP.NETÖеÄAJAXÓ¦Óÿª·¢×ܽá

        11ÔÂ21ÈÕÍí£·µãÓ¦ÑûÔÚÎ人´óѧÐÅϢѧԺ×öÁËÒ»³¡¹ØÓÚASP.NETÏÂAJAX¿ª·¢µÄ±¨¸æ£¬ÒÔÎÒ×Ô¼º¾­Àú½²ÊöÁËһЩÌØÊâÓ¦ÓÃÔÚ¹ýÈ¥µ½ÏÖÔÚʵÏÖÊֶεı仯£¬±¾À´Ïë»Ø¼ÒÖ®ºó×ö¸ö×ܽáµÄ£¬µ«ÊÇÓÉÓÚ×î½üÒÔÀ´ÊÂÇéÒ»Ö±ºÜ¶à£¬ËùÒÔûÓÐÀ´µÃ¼°×ܽᡣ½ñÍíµÃÒÔÓпÕ×ܽáһϡ£
AJAX½éÉÜ
ÆäʵAJAXÓ¦ÓÃµÄºË ......

c#(asp.net)¼¸Öв»Í¬´Óǰ̨ҳÃæ²Ù×÷ºǫ́

µÚÒ»ÖÖ
<%=RetInfo("DB","Êý¾Ý¿â") %>
<%=RetInfo("YX_UpFile","ÉÏ´«Îļþ") %>
<%=RetfileInfo("Include/", "¹ã¸æ")%>
//´Óǰ̨µ÷Óúǫ́·½·¨
//´Óǰ̨µ÷Óúǫ́µÄ·½·¨..²¢ÏòÆä·½·¨´«È벻ͬµÄ²ÎÊý!
µÚ¶þÖÖ
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "Èȵã")%> ......

ʹÓÃASP.NET Global.asax Îļþ

Global.asax Îļþ£¬ÓÐʱºò½Ð×ö asp.net Ó¦ÓóÌÐòÎļþ£¬ÌṩÁËÒ»ÖÖÔÚÒ»¸öÖÐÐÄλÖÃÏìÓ¦Ó¦ÓóÌÐò¼¶»òÄ£¿é¼¶Ê¼þµÄ·½·¨¡£Äã¿ÉÒÔʹÓÃÕâ¸öÎļþʵÏÖÓ¦ÓóÌÐò°²È«ÐÔÒÔ¼°ÆäËüһЩÈÎÎñ¡£ÏÂÃæÈÃÎÒÃÇÏêϸ¿´Ò»ÏÂÈçºÎÔÚÓ¦ÓóÌÐò¿ª·¢¹¤×÷ÖÐʹÓÃÕâ¸öÎļþ¡£
¸ÅÊö
Global.asax λÓÚÓ¦ÓóÌÐò¸ùĿ¼Ï¡£ËäÈ» Visual Studio .NET »á×Ô¶¯²åÈëÕ⸠......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ