动态生成的选项卡的

动态生成的选项卡的

本文介绍了捕获动态生成的选项卡的单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

朋友,

我已经动态创建了选项卡面板,并尝试使用以下代码现在显示它们:

//创建一个与TabID相关联的新TabPanel
AjaxControlToolkit.TabPanel选项卡=新的AjaxControlToolkit.TabPanel();
tab.HeaderText = dirList [i];
tab.ID ="ID" + i + 1;
//将TabPanel添加到包含动态选项卡的TabContainer中
TabContainer1.Tabs.Add(tab);

现在,我有兴趣捕获这些动态生成的选项卡的点击事件.
我认为我们可以通过以下方式进行操作:
但这无法解决:
if(tab.selectedevent =="dirList [i]")
{

}

Hi Friends,

I have created tab panel dynamically and trying to display them now by using following code:

//creating a new TabPanel that is associated with the TabID
AjaxControlToolkit.TabPanel tab = new AjaxControlToolkit.TabPanel();
tab.HeaderText = dirList[i];
tab.ID = "ID" + i+1;
//Adding the TabPanel to the TabContainer that contains the dynamic tabs
TabContainer1.Tabs.Add(tab);

Now I am interested to capture click event of these dynamically generated tabpanels.
I think we can do in the following way:
but this is not working out:
if(tab.selectedevent =="dirList[i]")
{

}

推荐答案

You can do like this in JQuery



这篇关于捕获动态生成的选项卡的单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 20:08