Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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"> ......

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

///   <summary>  
        ///   ´´½¨Êý¾Ý¿â¡£  
        ///   </summary>
        ///   <param name="srvName">±íÊ ......

Asp.Net ·Ö²ã¿ª·¢

Êý¾Ý²ã: Linq to sql
ÒµÎñÂß¼­²ã:×Ô¼ºÊµÏÖ£¬·â×°ÒµÎñ¶ÔÏó¶ÔÊý¾Ý¿âµÄ·ÃÎÊ£¬ÎÒµÄÂß¼­²ã±ÈÄãµÄ×öµÄ¹¤×÷Òª¶à£¬ÎÒ¼õÉÙÁËUI²ãµÄ´úÂëÁ¿¡£
Model²ã:ÓÃÓÚUI²ãչʾʹÓõÄModel£¬Êý¾Ý¿ÉÄÜÀ´Ô´ÓÚ¶àÕÅ±í£¬¾ßÌåÊý¾ÝÌî³äÔÚÂß¼­²ãÖиºÔð
UI²ã:¸ºÔð´«µÝÊý¾Ý£¬Õ¹Ê¾Êý¾Ý
SQLµÄÖÊÁ¿ÆäʵºÍ³ÌÐòÔ±µÄˮƽÓйØ
ÕâÒ²ÊÇΪʲô΢ÈíһֱŬÁ¦Èôó ......

Asp.netµ¯³ö´°¿Ú´óÈ«

 
Dim strScript As String = "<Script Language='VBScript'>" &vbCrLf
strScript &= "opener.parent.document.location.href=""" &"../Individual/UserJobs.aspx?EntityTableID=" &Request("EntityTableID") &"&ListID=" &BLL.TableType.Entity &"&OrgID=" &Request ......

asp.netµÄXMLͨÓòÙ×÷Àà

using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Syste ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ