[英]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. 由于我想为我的sql server表创建默认的插入表单,因此我已将详细信息视图的DefaultMode属性更改为Insert。 Now I wish to add the validators, like RequiredFieldValidator,RegularExpressionValidator etc.
现在,我想添加验证器,例如RequiredFieldValidator,RegularExpressionValidator等。
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 )?
如果没有,那么有没有一种快捷方式可以为Asp.net中的数据库表创建插入表单,例如python框架web2py中的SQLFORM( 请参阅此处 )?
将所有boundfields
转换为TemplateField
,打开每个TemplateField
EditItemTemplate
以添加validation
控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.