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;
}
Ïà¹ØÎĵµ£º
ÏÂͼÖкìÉ«¼ýÍ·ÊǸ¸Àà ¶øÇÒÊôÓÚ¸ùĿ¼¼¶±ð¡£
¡¡¡¡ÏÂÃæ¸ö×Ö¶ÎΪ£ºID¡¡¡¡¸¸ID¡¡ ÀàÐÍÃû³Æ¡¡ Éî¶È¡¡ ÅÅÐò
¡¡¡¡Ç°Ãæ3¸ö×Ö¶ÎûÓÐʲô¿É½âÊ͵ģ¬×ö¹ýÎÞÏÞ¼¶·ÖÀàÉè¼ÆµÄÈ˶¼Ó¦¸ÃÇå³þ
¡¡¡¡¶øµÚ5¸ö×Ö¶ÎÅÅÐò×Ö¶ÎID£º43µÄ23ÅÅÐò´ú±íËûÔÚÕâÕűíÅÅÔÚ23µÄ¸ùĿ¼
¡¡¡¡¶ø23ÏÂÃæµÄ23,01 ˵Ã÷ËûÊÇ2¼¶·ÖÀ࣬ÅÅÔÚ23ÏÂÃæµÄµÚ01¸ö£¬Ò²ÊÇÖ§³Ö99¼ ......
Õ⼸ÌìÒ»Ö±ÔÚΧÈÆASP.NET MVC½øÐÐѧϰ£¬ËäȻ֮ǰ½Ó´¥ÁËһЩ£¬µ«ÊÇ»¹Ã»ÓÐÕâôϵͳµÄ×ö¹ýÏà¹ØµÄ²âÊÔѧϰ£¬ÔÚ×îºó¶ÔÆä½øÐÐ×ܽᣬϣÍû¶ÔÓÚ³õѧMVCµÄÈ˶¼ÓÐËù°ïÖú¡£
ÏÖÔÚ½«ASP.NET MVCµÄһϵÁÐÎÄÕÂÕûÀíÈçÏ£º
1¡¢¡¾ASP.NETרÌâ¡¿(1)——ASP.NET MVC³õ̽£º
http://blog.csdn.net/rocket5725/archive/2010/01/11/5177 ......
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 ......
1¡¢Ê×ÏÈÏÂÔØowc11£ºowc11(http://www.svnhost.cn/Download/Detail-60.shtml)
2¡¢ÒýÓÃOWC£º´ò¿ª"½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷"Ãæ°å£¬Êó±êÓÒ¼üµ¥»÷"ÒýÓÃ"£¬Ñ¡Ôñ"Ìí¼ÓÒýÓÃ"²Ëµ¥£¬ÔÚµ¯³öµÄ"Ìí¼ÓÒýÓÃ"¶Ô»°¿òÖе¥»÷"COM"¿¨Æ¬£¬ÕÒµ½"Microsoft Office Web Components 10.0(office 2003ÊÇ11.0)"£¬µ¥»÷"Ñ¡Ôñ"ºÍ"È·¶¨"°´Å¥£¬OWC¾Í±»Ìí¼Óµ½ÁËÒý ......