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

asp.netÎı¾¿òÑéÖ¤ÊäÈë


//ʹÓÃÑéÖ¤·½·¨
 if (!InputValidator(txt.Text.Trim()))
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "myScript", "alert('\"Îı¾¿ò\"ÊäÈëÁË·Ç·¨×Ö·û»òÊäÈ볬³¤£¡');", true);
                return;
            }
//ÑéÖ¤·½·¨
protected bool InputValidator(string inputStr)
{
   //Ö»ÄÜÊäÈëÖÐÎÄ£¬Ó¢ÎÄ£¬Êý×Ö£¬ÖÐÓ¢Îıêµã(¹ýÂËÓ¢Îĵ¥ÒýºÅ)¡£
   if (Regex.IsMatch(inputStr, "^[\u4e00-\u9fa50-9a-zA-Z_£¬¡££¿£º£»‘’£¡“”—……¡¢(£­{2}) (£¨£©) (¡¾¡¿) ({}) (¡¶¡·)-,.?:;\"!`(\\-{2})(\\.{3})(\\(\\))(\\[\\])({})]{0,50}$"))
   {
       return true;
   }
   return false;
}
//js·½Ê½´¦Àí
  var regExp=new RegExp("^[\u4e00-\u9fa50-9a-zA-Z_£¬¡££¿£º£»‘’£¡“”—……¡¢(£­{2}) (£¨£©) (¡¾¡¿) ({}) (¡¶¡·)-,.?:;\"!`(\\-{2})(\\.{3})(\\(\\))(\\[\\])({})]{0,50}$");
         if(!regExp.test(txt1.value))
         {
          alert('ÊäÈëÁË·Ç·¨×Ö·û»òÊäÈ볬³¤£¡');
          txt1.focus();
          return;
         }


Ïà¹ØÎĵµ£º

asp.net ³¤ÄÚÈÝÎÄÕÂ×Ô¶¯·ÖÒ³

ǰ̨´úÂ룺
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="articleview.aspx.cs" Inherits="articleview" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> ......

´¦ÀíÓзµ»ØÖµµÄºÍreturnµÄasp.netд·¨

 SqlConnection   conPortal   =   new   SqlConnection(CommunityGlobals.ConnectionString);  
                          SqlCommand   cmdAdd   =   new   SqlCommand(   "Community_Disc ......

ASP.NET ÎÞÏÞ¼¶·ÖÀà

ÏÂͼÖкìÉ«¼ýÍ·ÊǸ¸Àà ¶øÇÒÊôÓÚ¸ùĿ¼¼¶±ð¡£
¡¡¡¡ÏÂÃæ¸ö×Ö¶ÎΪ£ºID¡¡¡¡¸¸ID¡¡ ÀàÐÍÃû³Æ¡¡ Éî¶È¡¡ ÅÅÐò
¡¡¡¡Ç°Ãæ3¸ö×Ö¶ÎûÓÐʲô¿É½âÊ͵ģ¬×ö¹ýÎÞÏÞ¼¶·ÖÀàÉè¼ÆµÄÈ˶¼Ó¦¸ÃÇå³þ
¡¡¡¡¶øµÚ5¸ö×Ö¶ÎÅÅÐò×Ö¶ÎID£º43µÄ23ÅÅÐò´ú±íËûÔÚÕâÕűíÅÅÔÚ23µÄ¸ùĿ¼
¡¡¡¡¶ø23ÏÂÃæµÄ23,01 ˵Ã÷ËûÊÇ2¼¶·ÖÀ࣬ÅÅÔÚ23ÏÂÃæµÄµÚ01¸ö£¬Ò²ÊÇÖ§³Ö99¼ ......

ASP.NET¶àƵµÀÍøÕ¾¼Ü¹¹ÊµÏÖ·½·¨

Ö÷Ìå¼Ü¹¹
¡¡¡¡¸÷ƵµÀ·Ö±ðλÓÚ²»Í¬µÄWeb Project(¾ßÓжÀÁ¢µÄ¶þ¼¶ÓòÃû)£¬²¢½«ËùÓеÄÒµÎñÂß¼­ÒÔ¼°Êý¾Ý·ÃÎʹ¦ÄÜ·â×°³ÉClass Library£¬ËùÓÐÆµµÀ¹²ÓÃÕâ¸öClass Library¡£ 
¡¡¡¡ÏÂÃæÏêϸ½éÉÜʵÏÖ·½·¨¡£ 
¡¡¡¡¼ÙÉèÍøÕ¾ÓÐÈý¸öƵµÀ£¬ÐÂÎÅ¡¢ÂÛ̳ÒÔ¼°²©¿Í£¬¶ÔÓ¦µÄ¶þ¼¶ÓòÃûΪ"news"¡¢"forum"¡¢"blog"¡£³ý´ËÖ®Í⣬»¹ÐèÒªÁ ......

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

///   <summary>  
        ///   ´´½¨Êý¾Ý¿â¡£  
        ///   </summary>
        ///   <param name="srvName">±íÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ