0

chkSubModuleView_CheckedChanged() イベントで chkModule の ID を取得する必要があります。サーバー側で子チェックボックスのクリック時に親チェックボックスの ID または参照を取得する方法を教えてください。異なるモジュールを区別する方法。

enter code here

<asp:ListView ID="lvModule" runat="server">
                <LayoutTemplate>
                    <table width="600px" border="0" cellpadding="0" cellspacing="0"     
class="ListViewtable">
                        <tr>
                            <th style="width: 10%;">
                                Modules
                            </th>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"> 
</asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:CheckBox ID="chkModule" runat="server"   
CausesValidation="false" AutoPostBack="true"
                                OnCheckedChanged="chkModule_CheckedChanged" > 
</asp:CheckBox><asp:HiddenField ID="hfEntityName"
                                    Value='<%# Eval("EntityName") %>' runat="server" />
                            <%# Eval("Title")%>
                            <asp:HiddenField ID="hfID" Value='<%# Eval("ID") %>'   
runat="server" />
                            <asp:Label ID="label" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-left: 20px;">
                            <asp:ListView ID="lvSubModule" runat="server">
                                <LayoutTemplate>
                                    <table width="100%" cellspacing="0" border="0"   
class="ListViewtableLayer2">
                                        <tr>
                                            <th style="width: 20%;">
                                                Sub Module
                                            </th>
                                            <th style="width: 20%;">
                                                <asp:CheckBox ID="chkSubModuleView"  
Checked="true" runat="server" AutoPostBack="true"

OnCheckedChanged="chkSubModuleView_CheckedChanged" />
                                                View
                                            </th>

                                        </tr>
                                        <asp:PlaceHolder ID="itemPlaceholder"   
runat="server"></asp:PlaceHolder>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <%# Eval("Title")%>
                                            <asp:HiddenField ID="hfMenuID" Value='<%#  
Eval("MenuID") %>' runat="server" />
                                            <asp:HiddenField ID="hfName" Value='<%#   
Eval("HeaderID") %>' runat="server" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="chkRead" runat="server"  
AutoPostBack="true" Checked="true" CausesValidation="false"

OnCheckedChanged="chkRead_CheckedChanged"></asp:CheckBox>
                                        </td>

                                    </tr>
                                </ItemTemplate>
                            </asp:ListView>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
4

1 に答える 1