ASP.NET±íµ¥ÑéÖ¤Ö®»ù±¾ÑéÖ¤¿Ø¼þÒ»
Asp.netΪÎÒÃÇÌṩÁËÁù¸öÑéÖ¤ÑéÖ¤¿Ø¼þ¼°ÆäÒªÆð×÷ÓñØÐëÉèÖõÄÊôÐÔ£º
(1) RequiredFieldValidator£º¸Ã¿Ø¼þÒªÇóÆä°ó¶¨µÄÊäÈë¿Ø¼þÒ»¶¨ÒªÓÐÊäÈëÖµ£¬²»ÄÜΪ¿Õ£»
ÊôÐÔ£ºControlToValidate:ÑéÖ¤¿Ø¼þÒªÑéÖ¤µÄÊäÈë¿Ø¼þID£¨°ó¶¨µÄÊäÈë¿Õ¼äID£©
Text£ºÊäÈë¿Ø¼þÊäÈëµÄÄÚÈݲ»ÄÜͨ¹ýÑé֤ʱÏÔʾµÄÄÚÈÝ
InitialValue:Ö¸¶¨ÑéÖ¤¿Ø¼þ²»ÄÜͨ¹ýÑéÖ¤µÄ³õʼֵ£¬Ä¬ÈÏΪ¿Õ
˵Ã÷£ºRequiredFieldValidator¿Ø¼þĬÈϼì²é²»ÊÇ¿Õ¸ñµÄ·Ç¿Õ×Ö·û´®¡£Èç¹ûΪ¿Õ»òÕßÌî¿Õ¸ñ£¬ÔòÏÔʾTextµÄÄÚÈÝ£¬×èÖ¹Ò³Ãæ·µ»Øºǫ́¡£ÆäʵÉú³ÉÒ³Ãæʱ£¬ÒѾ°ÑÑéÖ¤ÑéÖ¤·½·¨·Åµ½ÁË¿Í»§¶ËÒ³Ã棬·µ»Ø·þÎñÆ÷Ç°»áµ÷ÓÃÑéÖ¤·½·¨£¬Ñé֤ʧ°ÜÔò×èÖ¹·µ»Ø·þÎñÆ÷¡£
RequiredFieldValidator¼ì²éĬÈϵijõʼֵÊÇ¿Õ»ò¿Õ¸ñ£¬µ±È»ÎÒÃÇÒ²¿ÉÒÔΪÆäÖ¸¶¨³õʼֵ¡£±ÈÈçÎÒÃDz»ÔÊÐíÓû§ÊäÈë”´Ë×Ö·û´®Ñé֤ʧ°Ü”µÄ×Ö·û´®£¬Ò»µ©ÊäÈëÕâ¸ö×Ö·û´®¾ÍÏÔʾ”Ñé֤ʧ°Ü”.°Ñ” ´Ë×Ö·û´®Ñé֤ʧ°Ü”¸³Öµ¸øInitialValueÊôÐÔ¼´¿É£¬µ«´Ëʱ²»ÄÜÔÙÑéÖ¤ÊÇ·ñΪ¿ÕÁË¡£ÕâÑùµÄÑéÖ¤ÌرðÊÊÓÃÔÚÏÂÀÁбíÖС£
(2) RangeValidator:¸Ã¿Ø¼þÒªÇóÆä°ó¶¨µÄ¿Ø¼þÊäÈëµÄÖµ±ØÐë½éÓÚÖ¸¶¨µÄ×î´ó×îСֵ֮¼ä¡£
ÊôÐÔ£ºControlToValidate:ÑéÖ¤¿Ø¼þÒªÑéÖ¤µÄÊäÈë¿Ø¼þID£¨°ó¶¨µÄÊäÈë¿Õ¼äID£©
Text£ºÊäÈë¿Ø¼þÊäÈëµÄÄÚÈݲ»ÄÜͨ¹ýÑé֤ʱÏÔʾµÄÄÚÈÝ
MinimumValue:ÑéÖ¤·¶Î§µÄ×îСֵ
MaximumValue:ÑéÖ¤·¶Î§µÄ×î´óÖµ
Type£ºÒªÑéÖ¤µÄÊý¾ÝÀàÐÍ(String\Integer\Double\Date\Currency(»õ±ÒÀàÐÍ))¡£
˵Ã÷£ºÑé֤ʱ£¬ÏÈÑéÖ¤ÊäÈëµÄ×Ö·û´®ÊÇ·ñÄÜת»»ÎªTypeÊôÐÔÖ¸¶¨µÄÄÚÈÝ£¬Èç¹û²»ÄÜת»»Ôò±¨´í£¬Èç¹ûÀàÐÍΪStringÔò½øÐÐÕý³£µÄ×Ö·û´®±È½Ï£¬Èç¹û³¬³öÖƶ¨µÄ·¶Î§Ò²±¨´í¡£±ØÐë×¢Òâ¸Ã¿Ø¼þ²»ÑéÖ¤ÊäÈëΪ¿ÕµÄÇé¿ö¡£´Ëʱ±ØÐë½áºÏRequiredFieldValidator¿Ø¼þ¡£
À©Õ¹£ºCurrency Êý¾ÝÀàÐÍ Currency ±äÁ¿´æ´¢Îª 64 루8 ¸ö×Ö½Ú£©ÕûÐ͵ÄÊýÖµÐÎʽ£¬È»ºó³ýÒÔ 10,000 ¸ø³öÒ»¸ö¶¨µãÊý£¬ÆäСÊýµã×ó±ßÓÐ 15 λÊý×Ö£¬ÓÒ±ßÓÐ 4 λÊý×Ö¡£ÕâÖÖ±íʾ·¨µÄ·¶Î§¿ÉÒÔ´Ó -922,337,203,685,477.5808 µ½ 922,337,203,685,477.5807¡£Currency µÄÀàÐÍÉùÃ÷×Ö·ûΪatºÅ (@)¡£Currency Êý¾ÝÀàÐÍÔÚ»õ±Ò¼ÆËãÓ붨µã¼ÆËãÖкÜÓÐÓã¬ÔÚÕâÖ
Ïà¹ØÎĵµ£º
1.ʲôÊǸöÐÔ»¯·þÎñ ¸öÐÔ»¯·þÎñÊÇÒ»ÖÖ¼¼Êõ¿ò¼Ü£¬ÎªÓû§ÌṩÁË×Ô¶¨ÒåÕ¾µãÍâ¹Û¡¢ÄÚÈÝ¡¢²¼¾Ö¡¢½ÇÉ«¹ÜÀíµÈ¹¦ÄÜ£¬ÈçͬQQ¿Õ¼äµÈ¡£ 2.¸öÐÔ»¯·þÎñÐèÒª³ÌÐòԱѧϰÄÄЩ·½Ã棬²ÅÄÜʵÏÖÕâЩ¹¦ÄÜ ¸öÐÔ»¯·þÎñÊÇÒ»¸ö¿ò¼Ü£¬Õâ¸ö¿ò¼Ü°üº¬3¸öºËÐŦÄÜ£º¸öÐÔ»¯Óû§ÅäÖá¢web²¿¼þ¡¢³ÉÔ±×ʸñÓë½ÇÉ«¹ÜÀí¡£ÎÒÃǾÍÊÇÒª×ÅÖØѧϰÕâ3¸ö¹¦ÄÜ¡ ......
ÓÉÓÚ¾³£ÒªÐ´Ò»Ð©²É¼¯µÄ³ÌÐò£¬ÏÂÃæµÄÈý¸öº¯ÊýÊDzɼ¯Öеĺܳ£Óõĺ¯Êý¡£¹ÃÇҽвɼ¯ÏµÍ³ÍòÄÜÕýÔò±í´ïʽ°É¡£
µÚÒ»¸ö£º//»ñÈ¡Ò³ÃæµÄhtmlÔ´Âë
public string GetHtmlSource(string Url, string charset)
{
& ......
ÔÚEmailϵͳÖо³£»áÉÏ´«¶à¸öÎļþµ½·þÎñÆ÷£¬Óû§´ó¶àÏ°¹ßÒ»´ÎÉÏ´«ËùÓеÄÎļþ£¬¶ø²»ÊÇÖð¸öÉÏ´«£¬ÎÒÃÇ¿ÉÒÔʹÓÃjavascript¶¯Ì¬µØÌí¼ÓfileÔªËص½±íµ¥£¬È»ºóÔÚ·þÎñÆ÷¶Ë´¦ÀíÕâЩfile
Ч¹ûͼÈçÏÂ:
Ò³Ãæ´úÂëMutlileFileUpload.aspxÈçÏÂ:
view plaincopy to clipboardprint?
<%@ Page Language="C#" AutoEventWireup="true" C ......
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"%>
<!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" & ......
ÔµØÖ·£º
http://msdn.microsoft.com/en-us/library/aa480476.aspx
IIS Authentication
ASP.NET authentication is a two-step process. First, Internet Information Services (IIS) authenticates the user and creates a Windows token to represent the user. IIS determines the authentication mode that it shoul ......