通过单击超链接打开选项卡面板 [英] open tabpanel by clicking hyperlink

查看:84
本文介绍了通过单击超链接打开选项卡面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好先生.
我有要求.那是我有一个Accordian控件,因为我有3个名为acc1,acc2,acc3的超链接.我有一个选项卡控件,其中有3个名为tab1,tab2,tab3的选项卡. 我的要求是,如果单击"acc1"超链接,则tabcontrol tabpanel"tab1"将位于顶部.如果单击"acc2",则"tab2"将位于顶部.如果单击"acc3",则"tab3"将显示在顶部.

hello sir.
i have requirement. that is " i have a Accordian control in that i have 3 hyperlinks named acc1,acc2,acc3. and i have one tab control in that i have 3 tabs named tab1, tab2, tab3.
my requirement is if we click "acc1" hyperlink, the tabcontrol tabpanel "tab1" will be exist on top. if click "acc2", "tab2" will be exist on top. if click "acc3" "tab3" will be appeared on top.
if any body know anser plz tell me.it urgent.

推荐答案


我做了类似的事情并将代码放在代码隐藏"文件中,因此,当用户单击超链接"时,它将设置TabPanels可见性和ActiveTabIndex:

Hi
I''ve done something simiar and put the code in the Code Behind file, so when a user clicks on the Hyperlink it will set the TabPanels visibilty and the ActiveTabIndex:

if (!IsPostBack)
{
    TabContainer1.ActiveTabIndex = 0;
    TabPanel1.Visible = true;
    TabPanel2.Visible = false;
    TabPanel3.Visible = false;
}

if (Request.QueryString["LINK_SENDER"] == "ACTIONS")
{
    TabContainer1.ActiveTabIndex = 2;
    TabPanel1.Visible = false;
    TabPanel2.Visible = true;
    TabPanel3.Visible = false;
}



希望对您有所帮助.

皮特



Hope that helps some.

Pete


这篇关于通过单击超链接打开选项卡面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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