我正在创建一个调查,它有 60 个文本框,我需要在点击提交按钮时至少填写其中的 40 个文本框,只要 40 个文本框内有文本就可以了。任何想法如何使用 C# 或其他方式来完成此任务?
我的一些文本框:
<div class="row">
<div class="span3">
<div class="control-group">
<asp:Label ID="SupperLbl" class="control-label required" runat="server" Text="Best Supper Club"></asp:Label>
<div class="controls">
<asp:TextBox ID="SupperTxtBox" class="span3" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="span3">
<div class="control-group">
<asp:Label ID="YogurtLbl" class="control-label required" runat="server" Text="Best Place for Frozen Yogurt"></asp:Label>
<div class="controls">
<asp:TextBox ID="YogurtTxtBox" class="span3" runat="server"></asp:TextBox>
</div>
</div>
</div>
</div>
<div class="row">
<div class="span3">
<div class="control-group">
<asp:Label ID="Label1" class="control-label required" runat="server" Text="Best Place for Dessert"></asp:Label>
<div class="controls">
<asp:TextBox ID="DessertTxtBox" class="span3" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="span3">
<div class="control-group">
<asp:Label ID="Label2" class="control-label required" runat="server" Text="Best Place for Chicken"></asp:Label>
<div class="controls">
<asp:TextBox ID="ChickenTxtBox" class="span3" runat="server"></asp:TextBox>
</div>
</div>
</div>
</div>
.....