2 – ASP.NET

ברוכים הבאים לעולם של DOTnet בנושא: ASP.NET בעמוד הזה יש צילומי מסך עם הסברים שלי בסרטון וידאו לכל צילום וצילום.

להלן סרטון וידאו עם הסבר לכל צילומי מסך שיש בעמוד הזה:

Now let's create other basic aspx pages

 

 

Let's modify Web.config

First let's add Validation

Second let's add default redirection

Button go home not Visible 

Field NAME will be checked by ValidationGroup="DetailsValidation" and it will be Required Field.

Field ExamID will be checked by ValidationGroup="DetailsValidation" and it will be Required Field with MaximumValue="800" MinimumValue="200"

 Field EmailID will be checked by ValidationGroup="DetailsValidation" and ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"

Field STATUS will be checked by ValidationGroup="DetailsValidation" and it will be controlled by ddlFamilyStatus.

Field ID will be checked by ValidationGroup="DetailsValidation" and it will be controlled by CustomValidator1_ServerValidate.

We take from tag "OnServerValidate" args, now we can check length of value of args. If something wrong so we print error via CustomValidator.

Field ID will be checked by ValidationGroup="DetailsValidation" and it will be Required Field.

Hide all form fields, after sent and make show HOME button.

Let's try enter NULL (nothing) will be called ValidationGroup (not custom)

Let's try enter number 7,  will be called custom validation

Now let's try use JavaScript for validation by ClientValidationFunction="CheckID"

Let's try enter ID =7