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

ASP.NET ASP.NET ·þÎñÆ÷¿Ø¼þµÄ¿Í»§¶ËÑéÖ¤


      Èç¹ûÓû§Ê¹ÓõÄä¯ÀÀÆ÷Ö§³Ö¶¯Ì¬ HTML (DHTML)£¬Ôò ASP.NET ÑéÖ¤¿Ø¼þ¿ÉÒÔʹÓÿͻ§¶Ë½Å±¾À´Ö´ÐÐÑéÖ¤¡£ÒòΪÕâÖֿؼþ¿ÉÒÔÌṩ¼°Ê±·´À¡£¨ÎÞÐèµ½·þÎñÆ÷µÄÍù·µ¹ý³Ì£©£¬ËùÒÔÓû§»á¸Ð¾õµ½Ò³µÄÐÔÄÜÓÐËù¸ÄÉÆ¡£
ÔÚ´ó¶àÊýÇé¿öÏ£¬ÎÞÐè¶ÔÒ³»òÑéÖ¤¿Ø¼þ×÷³öÈκθü¸Ä±ã¿ÉʹÓÿͻ§¶ËÑéÖ¤¡£¿Ø¼þ½«×Ô¶¯¼ì²âä¯ÀÀÆ÷ÊÇ·ñÖ§³Ö DHTML ²¢Ö´ÐÐÏàÓ¦µÄ¼ì²é¡£¿Í»§¶ËÑé֤ʹÓõĴíÎóÏÔʾ»úÖƺͷþÎñÆ÷¶ËÑéÖ¤Ïàͬ¡£
 
Ò»¡¢¿Í»§¶ËÑéÖ¤µÄ²îÒì
Èç¹ûÊÇÔÚ¿Í»§¶ËÉÏÖ´ÐÐÑéÖ¤£¬ÔòÑéÖ¤¿Ø¼þ¿ÉÒÔ°üÀ¨Ä³Ð©¸½¼Ó¹¦ÄÜ£º
·Èç¹û´òËãÉú³ÉÑéÖ¤´íÎóÐÅÏ¢ÕªÒª£¬Äú¿ÉÒÔÔÚÏûÏ¢¿òÖÐÏÔʾÕâЩÐÅÏ¢£¬¸Ã¿òÔÚÓû§Ìύҳʱ³öÏÖ¡£
·ÑéÖ¤¿Ø¼þµÄ¶ÔÏóÄ£ÐÍÔÚ¿Í»§¶ËÂÔÓв»Í¬¡£
 
¿Í»§¶ËÑéÖ¤¾ßÓÐÒÔϼ¸¸öϸ΢²»Í¬Ö®´¦£º
·Èç¹ûÆôÓÿͻ§¶ËÑéÖ¤£¬ÔòÒ³½«°üº¬¶ÔÖ´Ðпͻ§¶ËÑéÖ¤ËùÓõĽű¾¿âµÄÒýÓá£
·Ê¹Óà RegularExpressionValidator ¿Ø¼þʱ£¬Èç¹û¿ÉÒÔʹÓüæÈÝ ECMAScript µÄÓïÑÔ£¨ÀýÈç Microsoft JScript£©£¬Ôò¿ÉÒÔÔÚ¿Í»§¶Ë¼ì²é±í´ïʽ¡£¿Í»§¶ËÕýÔò±í´ïʽ¼ì²éÓëÔÚ·þÎñÆ÷ÉÏʹÓà Regex Àà½øÐеÄÕýÔò±í´ïʽ¼ì²éÏà±È£¬Á½ÕߵIJîÒì·Ç³£Ð¡¡£
·Ò³Öаüº¬¿Í»§¶Ë·½·¨£¬ÒÔ±ãÔÚÒ³Ìύǰ½Ø»ñ²¢´¦Àí Click ʼþ¡£
 
¶þ¡¢¿Í»§¶ËÑéÖ¤¶ÔÏóÄ£ÐÍ
ÑéÖ¤¿Ø¼þÔÚ¿Í»§¶ËÉϳÊÏֵĶÔÏóÄ£ÐÍÓëÔÚ·þÎñÆ÷ÉϳÊÏֵĶÔÏóÄ£Ðͼ¸ºõÍêÈ«Ïàͬ¡£ÀýÈ磬ÎÞÂÛÔÚ¿Í»§¶ËÉÏ»¹ÊÇÔÚ·þÎñÆ÷ÉÏ£¬Äú¶¼¿ÉÒÔͨ¹ýÏàͬµÄ·½Ê½¶ÁÈ¡ÑéÖ¤¿Ø¼þµÄ IsValid ÊôÐÔÒÔ²âÊÔÑéÖ¤¡£
µ«ÊÇ£¬ÔÚÒ³¼¶±ðÉϹ«¿ªµÄÑéÖ¤ÐÅÏ¢ÓÐËù²»Í¬¡£ÔÚ·þÎñÆ÷ÉÏ£¬Ò³Ö§³ÖÊôÐÔ£»ÔÚ¿Í»§¶Ë£¬Ëü°üº¬È«¾Ö±äÁ¿¡£Ï±í±È½ÏÁËÔÚÒ³ÉϹ«¿ªµÄÐÅÏ¢¡£
¿Í»§¶ËÒ³±äÁ¿
·þÎñÆ÷Ò³ÊôÐÔ
Page_IsValid
IsValid
Page_Validators£¨Êý×飩   °üº¬¶ÔÒ³ÉÏËùÓÐÑéÖ¤¿Ø¼þµÄÒýÓá£
Validators£¨¼¯ºÏ£©   °üº¬¶ÔËùÓÐÑéÖ¤¿Ø¼þµÄÒýÓá£
Page_ValidationActive   ±íʾÊÇ·ñÓ¦½øÐÐÑéÖ¤µÄ²¼¶ûÖµ¡£Í¨¹ý±à³Ì·½Ê½½«´Ë±äÁ¿ÉèÖÃΪ false ÒԹرտͻ§¶ËÑéÖ¤¡£
£¨ÎÞµÈЧÏ
      ˵Ã÷£º ËùÓÐÓëÒ³Ïà¹ØµÄÑéÖ¤ÐÅÏ¢¶¼Ó¦±»ÊÓΪֻ¶ÁÐÅÏ¢¡£
 
Èý¡¢·¢Ë;ßÓпͻ§¶ËÑéÖ¤´íÎóµÄÒ³
ÔÚijЩÇé¿öÏ£¬Äú¿ÉÄܲ»Ô¸ÒâʹÓÿͻ§¶ËÑéÖ¤¶øÔ¸Òâ½öʹÓ÷þÎñÆ÷¶ËÑéÖ¤£¬¼´Ê¹ÊÇ¿ÉÒÔʹÓÿͻ§¶ËÑéÖ¤ÒàÈç´Ë¡£ÀýÈ磬Èç¹ûÑéÖ¤ÐèҪʹÓÃÖ»ÓзþÎñÆ÷²ÅÓеÄÐÅÏ¢»ò×ÊÔ´£¨ÀýÈç·ÃÎÊÊý¾Ý¿â£©£¬Ôò¿Í»§¶ËÑéÖ¤²»¿ÉÐС£
ĬÈÏÇé¿öÏÂ


Ïà¹ØÎĵµ£º

ASP.NET post·ÃÎÊÍâÍø½Ó¿Ú»ñÈ¡Êý¾Ý

·½·¨Ò»£º
 string postData = string.Format("a=1&b=2");   //post´«µÝ²ÎÊý
        Stream outstream = null;
        Stream instream = null;
        StreamReader sr = null;
&nb ......

asp.netÖÐÈçºÎ»Ø³µ´¥·¢Ö¸¶¨°´Å¥µÄʼþ

ÔÚ.aspxÒ³ÃæÖÐÌí¼Ó£º
<SCRIPT LANGUAGE="javascript">
function SubmitKeyClick(button)
{   
     if (event.keyCode != 13) ;return;
     {       
         eve ......

aspºÍÊý¾Ý¿âµÄ¹ÊÊÂ

1.ASPÁ¬½ÓAccessÊý¾Ý¿â
<%
dim conn,mdbfile
mdbfile=server.mappath("Êý¾Ý¿âÃû³Æ.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=Êý¾Ý¿âÃÜÂë;dbq="&mdbfile
%>
2. ASPÓëSQLÊý¾Ý¿âÁ¬½Ó£º
<%
dim conn
set c ......

aspÔ¶³Ì·ÃÎÊsql serverÊý¾Ý¿â


<%
set conn=server.createobject("adodb.connection")
conn.connectionstring="PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=210.76.209.130;DATABASE=databasename;UID=sa;PWD=password;"
conn.open
%>
ÆäÖÐ 210.76.209.130 ¾ÍÊÇÔ¶³Ì·þÎñÆ÷µÄIP
¶þ¡¢ÎÒÓÃVBдÁ˸ö¹ÜÀíÈí¼þ,²¢²ÉÈ¡PINGÔ¶³Ì·þÎñÆ÷ÓòÃûµÄ ......

ASP³ÌÐòÓëSQL´æ´¢¹ý³Ì½áºÏʹÓÃÏê½â

´æ´¢½ø³Ì¾ÍÊÇ×÷Ϊ¿ÉÖ´ÐжÔÏó´æ·ÅÔÚÊý¾Ý¿âÖеÄÒ»¸ö»ò¶à¸öSQLÃüÁî¡£
¶¨Òå×ÜÊǺܳéÏó¡£´æ´¢½ø³ÌÆäʵ¾ÍÊÇÄÜÍê³ÉÒ»¶¨²Ù×÷µÄÒ»×éSQLÓï¾ä£¬Ö»²»¹ýÕâ×éÓï¾äÊÇ·ÅÔÚÊý¾Ý¿âÖеÄ(ÕâÀïÎÒÃÇ̸ֻSQL SERVER)¡£Èç¹ûÎÒÃÇͨ¹ý´´½¨´æ´¢½ø³ÌÒÔ¼°ÔÚASPÖе÷Óô洢½ø³Ì£¬¾Í¿ÉÒÔ±ÜÃ⽫SQLÓï¾äͬASP´úÂë»ìÔÓÔÚÒ»Æð¡£ÕâÑù×öµÄºÃ´¦ÖÁÉÙÓÐÈý¸ö£º
µÚÒ»¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ