when I click on option 1 the data should be visible in next pane and vice versa
每当用户单击Option1时,都应如图所示将数据显示到下一个窗格。
因此该怎么办?
最佳答案
将选项视为按钮
ASP代码
<asp:Button ID="Option1Btn" class="btn" runat="server" OnClick="showDivContent1" />
<asp:Button ID="Option2Btn" class="btn" runat="server" OnClick="showDivContent2" />
<div runat="server" id="option1Content" Visible="false">Some Content </div>
<div runat="server" id="option2Content" Visible="false">Some Content </div>
后端代码
protected void showDivContent1(object sender, EventArgs e)
{
Option1Btn.Visible = false;
option1Content.Visible = true;
}
同样,您也可以为第二个选项做
protected void showDivContent2(object sender, EventArgs e)
{
Option2Btn.Visible = false;
option2Content.Visible = true;
}
关于c# - CSS对齐代码并在下一个 Pane 中显示数据,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38842833/