简体   繁体   中英

Validators in DetailsView insert mode

I have changed the DefaultMode property of my details view to Insert since I wanted to create default insert form for my sql server table. Now I wish to add the validators, like RequiredFieldValidator,RegularExpressionValidator etc.

So is that possible? If not, then is there a shortcut way to create an Insert form for a database table in Asp.net like SQLFORM in python framework web2py( refer here )?

将所有boundfields转换为TemplateField ,打开每个TemplateField EditItemTemplate以添加validation控件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM