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

Asp.net×Ô¶¨ÒåÑéÖ¤¿Ø¼þCustomValidator µÄʹÓ÷½·¨

javascript º¯Êý ºÍ CustomValidator¿Ø¼þÏà½áºÏʹÓÃ
<asp:TextBox ID="txtPwdPrompt" runat="server"></asp:TextBox>
<asp:CustomValidator id="CVPwdPrompt" runat="server" ClientValidationFunction="CheckPwd" ControlToValidate="txtPwdPrompt" ErrorMessage="<span style='font:12px'>ÌáʾÎÊÌâ±ØÐëÔÚ2-50¸ö×Ö·ûÄÚ</span>" Display="None"></asp:CustomValidator>
Javascriptº¯Êý:
<script language="javascript" type="text/javascript">
function CheckPwd(source, arguments)
{
   if(arguments.Value.Length>2 || arguments.Value.Length < 50)
   {
     arguments.IsValid=true;
   }
   else
   {
     arguments.IsValid =false;
   }
}
</script>
º¯ÊýÓÐÁ½¸ö²ÎÊý:
source ²ÎÊýÊǶÔΪ CustomValidator ¿Ø¼þ³ÊÏÖµÄ <span> ÔªËصÄÒýÓá£Òò´Ë£¬Äú¿ÉÒÔ±à³ÌµÄ·½Ê½¿ØÖÆ <span> ±ê¼Ç£¬ÈçÐÞ¸Ä InnerHtml ÊôÐÔ¡£
arguments ²ÎÊýÊÇÒ»¸ö¾ßÓÐÒÔÏÂÁ½¸öÊôÐԵĶÔÏó£ºValue ºÍ IsValid¡£Ê¹Óô˲ÎÊý¿ÉÒÔ»ñÈ¡¿Ø¼þµÄÖµ£¬ÒÔ¸ù¾Ý×Ô¶¨ÒåÑéÖ¤Àý³ÌÑéÖ¤²¢Ö¸Ê¾¸ÃÖµÊÇ·ñÓÐЧ¡£
      ʹÓà ClientValidationFunction ÊôÐÔÖ¸¶¨Óë CustomValidator ¿Ø¼þ¹ØÁªµÄ¿Í»§¶ËÑéÖ¤½Å±¾º¯ÊýµÄÃû³Æ¡£ÓÉÓڸýű¾º¯ÊýÔÚ¿Í»§¶ËÖ´ÐУ¬Òò´Ë¸Ãº¯Êý±ØÐëʹÓÃÄ¿±êä¯ÀÀÆ÷Ö§³ÖµÄÓïÑÔ£¨Èç VBScript »ò JScript£©À´±àд¡£
Óë·þÎñÆ÷¶ËÑéÖ¤Ò»Ñù£¬¿ÉÒÔͨ¹ýʹÓà arguments ²ÎÊýµÄ Value ÊôÐÔÀ´·ÃÎÊÒªÑéÖ¤µÄÊäÈë¿Ø¼þÖеÄ×Ö·û´®¡£Í¨¹ýÉèÖà arguments ²ÎÊýµÄ IsValid ÊôÐÔ·µ»ØÑéÖ¤½á¹û¡£
×¢Òâ:ValueÊ××Öĸ±ØÐë´óд


Ïà¹ØÎĵµ£º

ASP.NETÖÐÈçºÎʵÏÖFORMÈÏÖ¤µÇ¼

ÈçºÎÔËÓà Form ±íµ¥ÈÏÖ¤
ASP.NET µÄ°²È«ÈÏÖ¤£¬¹²ÓГWindows”“Form”“Passport”“None”ËÄÖÖÑé֤ģʽ¡£“Windows”Óë“None”ûÓÐÆðµ½±£»¤µÄ×÷Ó㬲»ÍƼöʹÓ㻓Passport”ÎÒÓÖûÓùý£¬°¦……ËùÒÔÎÒÖ»ºÃ½²½²“Form”ÈÏ ......

ASP.NETµ÷ÓÃjavascript½Å±¾µÄ·½·¨

1¡¢Ö±½ÓÔÚǰ̨µ÷Óà javascript º¯Êý
ºÜ¼òµ¥,ÔÚ head ÔªËØÖ®¼ä¼ÓÈë script ÔªËØ,½« type ÔªËØÉèÖÃΪ " text/javascript "
Èç:
<head runat="server">
<script type="text/javascript" >
function ShowName(str)
{
alert("ÄúµÄÃû×ÖΪ:("+str+")");
}
</script>
    <title> ......

ѧϰasp.net±È½ÏÍêÕûµÄÁ÷³Ì

 Èç¹ûÄãÒѾ­Óн϶àµÄÃæÏò¶ÔÏ󿪷¢¾­Ñ飬Ìø¹ýÒÔÏÂÕâÁ½²½£º
¡¡¡¡µÚÒ»²½¡¡ÕÆÎÕÒ»ÃÅ.NETÃæÏò¶ÔÏóÓïÑÔ£¬C#»òVB.NET ÎÒÇ¿ÁÒ·´¶ÔÔÚûϵͳѧ¹ýÒ»ÃÅÃæÏò¶ÔÏó(OO)ÓïÑÔµÄÇ°ÌáÏÂȥѧASP.NET¡£ ASP.NETÊÇÒ»¸öÈ«ÃæÏò¶ÔÏóµÄ¼¼Êõ£¬²»¶®OO£¬ÄǾø¶Ôѧ²»ÏÂÈ¥!
¡¡
¡¡µÚ¶þ²½¡¡¶Ô.NET FrameworkÀà¿âÓÐÒ»¶¨µÄÁ˽⠿ÉÒÔͨ¹ý¿ª·¢Windows Fo ......

³õѧasp.netµÄ¸ÐÎò£¡

    ¾­¹ý¶Ôasp.netµÄѧ£¬ÎÒ¾õµÃÔ½À´Ô½Á¦²»´ÓÐÄ°¡£¡ËµÊµ»°ÎÒÏÖÔÚ¶¼²»¸Ò˵×Ô¼ºÒѾ­ÈëÃÅÁË£¡ÓÐʱºòÕæÏ룬ÎÒµ½µ×Êʺϲ»ÊʺÏѧÕâ¸ö£¬ÎÒ²¢²»ÊÇÓöµ½À§ÄѾÍÏëÌӱܣ¬Ö»ÊÇÎÒÕÒ²»µ½ºÏÊʵķ½·¨À´½â¾ö×Ô¼ºÓöµ½µÄÎÊÌâ¡£¶¼ËµÇ§ÄêÄ¥Ò»½££¬ÏÖÔÚ²ÅÕæÕýÈÏʶµ½£¬ÏëÒªµÃµ½µã¶ù¶«Î÷£¬Ã»Óе㸶³öºÍÎþÉüÊÇ¿ÉÄܵÄÊ£¡
  &n ......

ASP.NET


      Image Web ·þÎñÆ÷¿Ø¼þʹÄú¿ÉÒÔÔÚ ASP.NET ÍøÒ³ÉÏÏÔʾͼÏñ£¬²¢ÓÃ×Ô¼ºµÄ´úÂë¹ÜÀíÕâЩͼÏñ¡£
 
Ò»¡¢±³¾°
¿ÉÒÔÔÚÉè¼Æʱ»òÔËÐÐʱÒÔ±à³Ì·½Ê½Îª Image ¶ÔÏóÖ¸¶¨Í¼ÐÎÎļþ¡£»¹¿ÉÒÔ½«¿Ø¼þµÄ ImageUrl ÊôÐ԰󶨵½Ò»¸öÊý¾ÝÔ´£¬ÒÔ¸ù¾ÝÊý¾Ý¿âÐÅÏ¢ÏÔʾͼÐΡ£
Óë´ó¶àÊýÆäËû Web ·þÎñÆ÷¿Ø¼þ²»Í¬£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ