如果在服务器端选中引导复选框,我需要得到真或假
这是控制:
<div id="CheckCategoria" runat="server" class="btn-group" data-toggle="buttons-checkbox" runat="server">
<asp:Button ID="ChkInspecao" OnClientClick="return false;" Text="Inspeção" UseSubmitBehavior="False" runat="server" CssClass="btn btn-check" />
<asp:Button ID="ChkHipot" OnClientClick="return false;" Text="Hipot" UseSubmitBehavior="False" runat="server" CssClass="btn btn-check" />
<asp:Button ID="ChkCalibracao" OnClientClick="return false;" Text="Calibração" UseSubmitBehavior="False" runat="server" CssClass="btn btn-check" />
<asp:Button ID="ChkChecagemInterna" OnClientClick="return false;" Text="Checagem Interna" UseSubmitBehavior="False" runat="server" CssClass="btn btn-check" />
<asp:Button ID="ChkRevisao" OnClientClick="return false;" Text="Revisão" UseSubmitBehavior="False" runat="server" CssClass="btn btn-check" />
</div>
正如他们所拥有的runnat="sever"
,我可以在服务器端获取它们,但我如何查看它是否已切换?
我试过了:
string Inspecao = ChkInspecao.Attributes["checked"];
但它返回null。
我怎样才能做到这一点?