在带有 C# 的 ASP.NET 中,如何将面板设置为可见而不回发?
我在一个页面中有三个面板,它们通过单击 3 个链接按钮进行切换。当您单击一个按钮时,一个面板设置为可见,另一个设置为不可见。那时我只需要显示所选链接的面板。
是否可以在不回发的情况下在 java 脚本中设置面板的可见性?
这是我的 aspx 代码:
<asp:Panel ID="panelTxtImage" runat="server"
style="z-index: 1; left: 438px; top: 116px; position: absolute; height: 218px; width: 521px">
<asp:Panel ID="PanelDropQuest" runat="server"
<asp:Label ID="LabelQuestGroup" runat="server"
style="z-index: 1; left: 15px; top: 13px; position: absolute; height: 24px; width: 131px;"
Text="Question Group" Font-Bold="True"></asp:Label>
<asp:CheckBox ID="CheckBoxImage" runat="server"
style="z-index: 1; left: 107px; top: 101px; position: absolute" />
</asp:Panel>
<asp:DropDownList ID="DropQuestions" runat="server"
style="z-index: 1; left: 173px; top: 33px; position: absolute; height: 19px; width: 274px">
<asp:ListItem Value="-1">Select</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="LabelQuestion" runat="server" Font-Bold="True"
style="z-index: 1; left: 52px; top: 89px; position: absolute; height: 28px; width: 52px"
Text="Question"></asp:Label>
<asp:TextBox ID="TxtWriteQuestion" runat="server"
style="z-index: 1; left: 173px; top: 85px; position: absolute; height: 24px; width: 325px"
TextMode="MultiLine"></asp:TextBox>
<asp:Label ID="LabelImage" runat="server" Font-Bold="True"
style="z-index: 1; left: 47px; top: 124px; position: absolute; height: 20px; width: 105px"
Text="Capture Image"></asp:Label>
<asp:Panel ID="Panel2" runat="server"
style="z-index: 1; left: 45px; top: 255px; position: absolute; height: 51px; width: 445px">
</asp:Panel>
<asp:Label ID="Label1" runat="server"
style="z-index: 1; left: 62px; top: 268px; position: absolute; height: 28px; width: 92px"
Text="QuestionGroup" Font-Bold="True"></asp:Label>
<asp:Button ID="ButtonMultichoice" runat="server"
style="z-index: 1; left: 396px; top: 502px; position: absolute; height: 33px; width: 91px"
Text="Create" onclick="ButtonMultichoice_Click" />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
style="z-index: 1; left: 122px; top: 698px; position: absolute; height: 142px; width: 222px">
<Columns>
<asp:TemplateField HeaderText="Column Name"></asp:TemplateField>
<asp:TemplateField HeaderText="Type "></asp:TemplateField>
<asp:TemplateField HeaderText="Values"></asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>