Dab tsi yog validation tswj hauv asp net?
Dab tsi yog validation tswj hauv asp net?

Video: Dab tsi yog validation tswj hauv asp net?

Video: Dab tsi yog validation tswj hauv asp net?
Video: Hmong - Benefits 2021: What You Need to Know 2024, Kaum ib hlis
Anonim

ASP . NET validation tswj validate tus neeg siv cov ntaub ntawv nkag los xyuas kom meej tias cov ntaub ntawv tsis muaj txiaj ntsig, tsis muaj pov thawj, lossis cov ntaub ntawv tsis sib xws tsis tau khaws cia.

ASP. NET muab cov nram qab no validation tswj:

  • RequiredFieldValidator.
  • RangeValidator.
  • Sib pivValidator.
  • RegularExpressionValidator.
  • CustomValidator.
  • ValidationSummary.

Ua raws li qhov kev pom no, koj txhais li cas los ntawm kev tswj xyuas qhov tseeb?

Txhais Validation Control hauv ASP. NET. - Cov validation tswj yog siv los siv cov nplooj ntawv qib validity ntawm cov ntaub ntawv nkag mus rau hauv lub server tswj . - Yog cov ntaub ntawv ua tsis dhau kev lees paub , nws yuav tso saib cov lus yuam kev rau tus neeg siv. - Nws yog ib feem tseem ceeb ntawm txhua daim ntawv thov web.

Ib sab saum toj no, pawg validation nyob rau hauv asp net yog dab tsi? Validation pawg tso cai rau koj siv tau cov ntaub ntawv nkag tswj hauv pab pawg . Server tswj xws li kev lees paub tswj, Khawm thiab TextBox muaj ValidationGroup cov cuab yeej uas siv txoj hlua tus nqi. Tag nrho cov servers tswj muaj tib yam ValidationGroup tus nqi ua raws li ib tug pawg validation.

Tom qab ntawd, lo lus nug yog, dab tsi yog qhov kev lees paub thiab hom validation hauv asp net?

Validation Controls hauv ASP. NET

Validation Control Kev piav qhia
RangeValidator Xyuas tias tus neeg siv nkag mus rau tus nqi uas poob ntawm ob qhov txiaj ntsig
RegularExpressionValidator Xyuas kom meej tias tus nqi ntawm ib qho kev tswj xyuas qhov sib npaug ntawm tus qauv

Tus neeg siv tswj hauv asp net yog dab tsi?

ASP . Net muaj peev xwm tsim cov neeg siv tswj . Cov neeg siv tswj yog siv los muaj code uas yog siv ntau zaus hauv ib daim ntawv thov. Cov tus neeg siv tswj tom qab ntawd tuaj yeem rov siv dua thoob plaws hauv daim ntawv thov. Cov khoom tseem tuaj yeem muab ntxiv rau hauv lub vev xaib tus neeg siv tswj.

Pom zoo: