问题描述
我们使用Ajax Accordion面板。我们从数据集动态绑定ajax手风琴。所以我们不确定要绑定多少窗格。
现在我们在每个手风琴窗格中添加了几个文本框和1个按钮,这是mandotory所以我们使用了必需的字段验证器。 br />
问题是当我在第一个窗格中的第一个窗格文本框中单击按钮显示它是必需的这很好,但即使我在第一个窗格中键入文本框。我无法在显示必须的剩余窗格中保存文本框。请指导我。
We using Ajax Accordion pane. We dynamically binding ajax accordion from data set. So we not sure how much pane wil be bind.
Now we added few textbox and 1 button in each accordion pane which is mandotory so we used required field validator.
The problem is when i click buton in first pane textbox in first pane showing "It is required" which is fine but even if i typed textbox in first pane. I am not able to save since textbox in remaining pane showing "It is required". Please guide me.
<cc1:Accordion ID="accRcvDetails" runat="server" SelectedIndex="-1" ContentCssClass="accordion-content" RequireOpenedPane="false" HeaderCssClass="accordion-header"
HeaderSelectedCssClass="accordionSelected" OnItemCommand="accRcvDetails_ItemCommand" OnItemDataBound="accRcvDetails_ItemDataBound">
<HeaderTemplate>
</HeaderTemplate>
<ContentTemplate>
<td class="searchlabel">
<asp:Label ID="lblNotes" runat="server" Text="Notes:"></asp:Label>
</td>
<td class="searchtext" colspan="3">
<asp:TextBox runat="server" ID="txtNotes" Width="100%" TextMode="MultiLine" Height="35px" />
<asp:RequiredFieldValidator ControlToValidate="txtNotes" Text="Note Field is Required" runat="server" />
</td>
<td>
<td style="text-align: right" colspan="8">
<asp:Button ID="btnSave" CssClass="searchbutton Accbtnsave" runat="server" CommandName="Save" Text="Save" />
</td>
</ContentTemplate>
</cc1:Accordion>
推荐答案
这篇关于Ajax手风琴窗格中的必填字段验证器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!