????? ??????? ????? ???? ?????? ?? ????? ASP.NET ?? Visual Basic .NET ?? ?? Visual Basic 2005

?????? ????????? ?????? ?????????
???? ???????: 316662 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

.NET Framework ????? ??? ?????? ?????? ?? ?????? ?? ??? ????? ??????, ??? ??? ?????? ????? ??? ASP.NET ? ?????? ?? ??? ????? ???????? ???? ?? ??????? ?? ?????? ?????? ?????? ????? ????? ???????? ??? ???? ????. ???? ??? ?????? ??? ????? ??????? ????? ???? ASP.NET ?????? ?? ????? ????? ?????? ????? ?????? ? ?? ???? ?????? ?????? ?? ????? ????????.

???????

???? ??????? ??????? ??????? ?????? ??? ????? ?????? ???????? ?????? ? ??? ??????? ????????:
  • Visual Studio .NET ?? Visual Studio 2005
  • Microsoft ???? ??????? ?????? (IIS) 5.0 ?? ????
????? ??? ??????? ??? ??????? ??? ???????? ???????:
  • ??????? ???
  • asp.net

??????? ????? ???? ASP.NET ?????? ?? Visual Studio .NET

???? ?????? ?? ??? ????? ???????? ???? cumbersome. ???? ?????? .NET Framework ????? ?????? ?? ????? ???? ?????? ?? ??? ????? ???????? ??? ????? ????? ???????? ???? ??? ?????? ?????? ??? ????? ?? ???? ???? ?????? ?? ???. ???? ??? ?? ???? ???? ??? ????? ????? ??? ????? ????? ?????? ?? ????? ??? ??? ?????? ???????. ???????? ??? ???? ????? ???? ???? ValidationSummary ???? ???? ????? ??????? ?????? ?????? ????? ?? ????? ????? ?? ??????.

????? ??????? ??????? ??? ??? ASP.NET ??????? ???? ????? ???????? ??? ???????? "?" ????? ?????? ?????????? "?" ???? ??????. ????? ???? ???????? ?????? ????????? ???????? ? ?????? ?? ??? ????? ?????? ???????? ?? ??????? ?????? ?? ??? ???????? ???????? ???? ??? ????? ??? ?? ????? ????? ?? ????? ?????? ?? ??????.
  1. ??? ????? Visual Studio .NET ?? Visual Studio 2005.
  2. ????? ????? ????? ??? ASP.NET ???? ?? Visual Basic .NET ?? ?? Visual Basic 2005.
  3. ??????? ??? ????? ??? HTML WebForm1.aspx ??????.
  4. ????? ????? ???? ??????? ???????? ??????? (?????????) ??? ??????? ????? ?? ??? ????? ?? ????????. ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ??? ???????? ??????? ??????? ?????? ????.

    ??????: ??? ??? ????????? ???????? ?? ???? HTML ?? ????? ?? ??? ????? ????????? ???????? ?? HTML. ?????? ????? ??? ??? ?? HTML ??? ??????? ????????.
    <table>
    <tr width=100>
    <td>UserName:</td>
    <td><input id=txtUserName type=text size=20 maxlength=15 runat=server/>*
    </td>
    </tr>
    
    <tr width=100>
    <td>E-mail Address:
    <td><input id=txtEmail type=text size=35 maxlength=30 runat=server/>  (someone@microsoft.com)
    </td>
    </tr>
    
    <tr width=100>
    <td>Password:</td>
    <td><input id=txtPassword type=password size=15 maxlength=10 runat=server/>*
    </td>
    </tr>
    
    <tr width=100>
    <td>Retype Password:</td>
    <td><input id=txtConfirmPassword type=password size=15 maxlength=10 runat=server/>*
    </td>
    </tr>
    </table>
    					
  5. ????? ???? RequiredFieldValidator ???? ?? ????? ??? ???? ????? ???? ???? ???? ??????. ????? ????? ???? RequiredFieldValidator ??? ??????? ???? ??? ???????? ? ???? ??????.

    ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ???</table> ???????:
    <asp:RequiredFieldValidator id=valUserNameRequired 
    ControlToValidate=txtUserName ErrorMessage="UserName is a required field." EnableClientScript=true Display=None Runat=server/>
    		<asp:RequiredFieldValidator id=valPasswordRequired 
    ControlToValidate=txtPassword ErrorMessage="Password is a required field." EnableClientScript=true Display=None Runat=server/>
    		<asp:RequiredFieldValidator id=valConfirmPasswordRequired 
    ControlToValidate=txtConfirmPassword ErrorMessage="Password confirmation is a required field."
    EnableClientScript=true Display=None Runat=server/>
    					
  6. ??? ???? ??? ?????? ?? ??? ???? ???? ?????? ???? ????? ???????? ???? ??? ???? ?????? ?????. ????? ??? ??????? ????? ??????? ?????? CompareValidator ????? ?????? ????? ??? ??? ?? ??????. ??????? ???? ???? CompareValidator ?????? ?? ??? ?????? ???? ??????.

    ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ??? ????? ????? ???? ?????? ?? ????? ?? ?????? 5:
    <asp:CompareValidator id=valComparePassword 
    ControlToValidate=txtConfirmPassword ErrorMessage="Password fields must match." ControlToCompare=txtPassword Display=None
    EnableClientScript=true Runat=server/>
    					
  7. ???? ???? ?? ??? ??????? ????? ???? ??????? ?????? ??? ??? ????? ?????? ????????. ???? ?????? RegularExpressionValidator ????? ????? someone @ microsoft ??????? .com. ??? ?????? ??????? ????? ????? ????? ???? ?? ??? ?? ????? ?? ????? ??? ??????? ????? ???????? ????? ???. ????? ???? ???? RegularExpressionValidator ?????? ?? ??? ????? ????? ?????? ?????????? ???? ?? ?????? ?? ??? ????????.

    ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ??? ????? ???? ?????? ?? ????? ??????:
    <asp:RegularExpressionValidator ID=valEmailAddress
    ControlToValidate=txtEmail	ValidationExpression=".*@.*\..*" ErrorMessage="Email address is invalid." 
    Display=None EnableClientScript=true Runat=server/>
    					
  8. ????? ?? ????? ??? ?????? ?????????? ?????? ???? ?????? ?????? ?? ??? ??????? ????? ?????? ???????? ?? ???????.

    ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ??? ????? ???? ?????? ?? ????? ??????:
    <br>
    <input type=submit id=cmdSumbit value=submit runat=server/>
    					
  9. ??????? ??? ??????? ???? ???? ValidationSummary ???? ???? ??? ?????? ????? ?? ????? ????? ?? ???????.

    ?? ???? HTML WebForm1 ???? ?? ?? ???? ???????? ???????? ??????? ??? ???????? ???????? ???? ?????:
    <br><br>
    <asp:ValidationSummary id=ValSummary HeaderText="The following 
    errors were found:" ShowSummary=True DisplayMode=List Runat=server/>
    					
  10. ???? ??? ???.
  11. ?? ??????? ????? ? ???? ??? "????" ?????? ??????? ???????.

    ??? ??? Form1 ??? ??????.

??????

  • ???? ???????? ??? "?????" ???? ????? ?? ??? ??????? ??? ??? ???? ????? ??? ??? ?????.
  • ?? ???? ???? ???????? ?????? ?????? ???? ?????? ??? ??????? "? ??? ??? ????? ?????"??? ?? ????? ?????? ???? ??????".
  • ?? ???? ???? ???????? ?????? ????? ?????? ???????? ???? ?? ?????? ?? ??????? ??????? ? ??? ??? ????? ????? "????? ?????? ?????????? ??? ????".

?????

?????? ??? ???? ?? ????????? ???????? ???????? ????? ???? ?????? ?? ????? ? ?????? ?????? ??? ????? ??? MSDN ??????:
????? ??? ????? ?????? ?? ?????
http://msdn2.microsoft.com/en-us/library/2e4hd649.aspx

????? ?????? ?????? ?? ?????
http://msdn2.microsoft.com/en-us/library/e5a8xz39(VS.71).aspx

????? ? ????? ?????? ValidationSummary
http://msdn2.microsoft.com/en-gb/library/wze2wh7t(VS.71).aspx

???????

???? ???????: 316662 - ????? ??? ??????: 24/????/1428 - ??????: 4.3
????? ???
  • Microsoft ASP.NET 1.0
  • Microsoft Visual Basic .NET 2002 Standard Edition
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Academic Edition
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic 2005
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Professional Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Standard Edition
????? ??????: 
kbmt kbvs2005applies kbvs2005swept kbhowtomaster kbinfo kbvalidation KB316662 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????316662

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com