ボタンのクリックで検証グループを割り当てることができません。
<asp:TabPanel ID="tabpnlTwo" runat="server" Visible="false" Width="100%" OnClientClick="radiobuttonvalidationForTabOne">
<ContentTemplate>
</ContentTemplate>
<asp:TabPanel ID="tabpnlTwo" runat="server" Visible="false" Width="100%" OnClientClick="radiobuttonvalidationForTabTwo">
<ContentTemplate>
</ContentTemplate>
ここで、tabpnanel呼び出しスクリプト関数onClientClickで、検証グループをボタンに割り当てます
<script>
function radiobuttonvalidationForTabOne() {
var btnAddOrderId = document.getElementById("btnAddToOrder");
btnAddOrderId.ValidationGroup = "tabpnlOneGroup";
alert(btnAddOrderId.ValidationGroup);
}
</script>
<script>
function radiobuttonvalidationForTabTwo() {
var btnAddOrderId = document.getElementById("btnAddToOrder");
btnAddOrderId.ValidationGroup = "tabpnlTwoGroup";
alert(btnAddOrderId.ValidationGroup);
}
</script>
<asp:Button ID="btnAddToOrder" CssClass="customButton" runat="server" Text="Add To Order" ValidationGroup="tabpnlOneGroup"
onclick="btnAddToOrder_Click" />