如何在更新面板中找到面板? [英] how to find panel inside in update panel?

查看:68
本文介绍了如何在更新面板中找到面板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我使用master并在更新面板中有一个更新面板
我放置了很多面板.

现在我要显示面板.,请给我一个解决方案.,

hi every body

i use master and have an update panel, inside the update panel
i placed lot of panel.

now i want to show the panel ., please give me a solutuion.,

<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>
    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1">







<asp:TabPanel ID="tab3" runat="server" HeaderText="3.Give Traveller Name(s)">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Panel ID="Panel1" runat="server"> // want to show this panel
<asp:Label ID="Label5" runat="server">Adult1</asp:Label>
<asp:DropDownList ID="ddl" runat="server">
<asp:ListItem>thiri</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</asp:Panel>

推荐答案

在更新面板旁边,我放置了很多面板.
现在我要显示面板.,请给我一个解决方案.
Panel是服务器端控件,可以使用其ID在服务器端直接访问.

因此适用于:
nside the update panel i placed lot of panel.
now i want to show the panel ., please give me a solutuion.,
Panel is a server side control that can be accessed directly on server side using it''s ID.

Thus for:
<asp:Panel ID="Panel1" runat="server"> 


做:


Do:

Panel1.Visible = true; // to show panel
Panel1.Visible = false; // to hide panel



要添加-在更新面板中还是不在更新面板中都没有关系.



To add on - it does not matter if it is in or out of Update Panel. Update panel is just a region defined for partial update if needed.


TabContainer1.FindControl("tab3").FindControl("P" + i.ToString()).Visible = true;
TabContainer1.FindControl("tab3").FindControl("P" + i.ToString()).Visible = true;


这篇关于如何在更新面板中找到面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆