UserControl yog dab tsi hauv asp net?
UserControl yog dab tsi hauv asp net?

Video: UserControl yog dab tsi hauv asp net?

Video: UserControl yog dab tsi hauv asp net?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Kaum ib hlis
Anonim

Cov neeg siv tswj tau siv kom muaj cov lej uas siv ntau zaus hauv daim ntawv thov. Cov tus neeg siv tswj tuaj yeem rov siv dua thoob plaws hauv daim ntawv thov. Cov tus neeg siv tswj yuav tsum tau sau npe rau ntawm lub ASP . Net nplooj ntawv ua ntej nws tuaj yeem siv tau. Siv tus neeg siv tswj hla txhua nplooj ntawv hauv daim ntawv thov, sau npe rau hauv lub vev xaib.

Ntawm no, UserControl yog dab tsi?

A UserControl yog ib feem, reusable ib feem ntawm apage. Koj tuaj yeem tso ib daig ntawm nplooj ntawv hauv ib UserControl , thiab tom qab ntawd rov siv nws los ntawm qhov chaw sib txawv.

Ib yam li ntawd, PostBack yog dab tsi hauv asp net? PostBack yog lub npe muab rau tus txheej txheem ntawm kev xa ib ASP . NET nplooj ntawv mus rau lub server rau kev ua haujlwm. PostBack ua tiav yog tias qee cov ntaub ntawv pov thawj ntawm nplooj ntawv yuav tsum tau kuaj xyuas qee qhov chaw (xws li kev txheeb xyuas tus neeg siv lub npe thiab tus password siv database).

Kuj Paub, siv cov ntaub ntawv.ascx hauv asp net yog dab tsi?

A ntaub ntawv nrog rau ASCX cov ntaub ntawv extension yog ib ASP . NET Web User Control ntaub ntawv uas sawv cev rau Active Server Control Extension. Hauv paus, ASCX cov ntaub ntawv ua kom yooj yim rau siv tib code hla ntau ASP . NET cov nplooj ntawv web, txuag lub sijhawm thiab lub zog thaum tsim lub vev xaib.

Dab tsi yog daim ntawv pom hauv asp net?

Taw qhia. Cov FormView tswj yog siv los qhia ib cov ntaub ntawv los ntawm cov ntaub ntawv qhov chaw. Nws zoo ib yam li kev tswj hwm ntawm DetailsView, tshwj tsis yog nws qhia cov neeg siv-txhais templates tsis yog kab teb. Binding rau cov ntaub ntawv qhov chaw tswj, xws liSqlDataSource thiab ObjectDataSource.

Pom zoo: