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.