标签建议要求。 [英] Tabs Suggestion Required.

查看:57
本文介绍了标签建议要求。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我在我的一个项目中使用Ajax选项卡控件。



我想在每个标签上显示多个网格onClick,它有超过8个标签,现在我的页面变得很重,所以需要很多时间才能加载。



And每个内容面板都有一个iframe,因此在相关的iframe中打开每个标签相关页面。



您能否建议我使用备用标签概念,以便快速加载每个标签内容。 br />


我只想保留Tab Concept。

解决方案

嗨Mahesh,



在Ajax选项卡容器中将有一个名为onactivetabchanged的事件,使用此事件并在更改activetabindex时为每个选项卡面板编写代码。并确保您已设置AutoPostback = true。查找以下示例代码FYR,



 <   asp:tabcontainer     id   =  tbhead    runat   =  server    xmlns:asp   = #unknown >  
ActiveTabIndex =0AutoPostBack =true
Width =100%Height =100%onactivetabchanged =tbhead_ActiveTabChanged >
< asp:tabpanel id = tab1 runat = 服务器 headertext = 示例 >
<! - 此处的代码 - > < / asp:tabpanel > < / asp:tabcon tainer >





在.CS文件中,< br $> b $ b

 受保护  void  tbhead_ActiveTabChanged( object  sender,EventArgs e)
{

if (tbhead.ActiveTabIndex == 0
{
// 此处的代码
}
其他 if (tbselfappr.ActiveTabIndex == 1
{
// 您的代码在这里
}
}


Dear All,

I am using Ajax tab control in one of my project.

I want to display multiple grid onClick of each tab,it having more than 8 tab now my page become to heavy so it will take lot of time to load.

And each content panel has one iframe so onclick of each tab related page open in related iframe.

Can you suggest me alternate Tab Concept so that each tab content load quickly.

I want to keep Tab Concept only.

解决方案

Hi Mahesh,

There will be one event in Ajax tab container called onactivetabchanged, use this event and write the code for each tab panel when the activetabindex was changed. And make sure you've set AutoPostback=true. Find the below sample code FYR,

<asp:tabcontainer id="tbhead" runat="server" xmlns:asp="#unknown">
	            ActiveTabIndex="0" AutoPostBack="true"
                    Width="100%" Height="100%" onactivetabchanged="tbhead_ActiveTabChanged">
                    <asp:tabpanel id="tab1" runat="server" headertext="sample">
<!-- your code here --></asp:tabpanel></asp:tabcontainer>



In .CS file,

protected void tbhead_ActiveTabChanged(object sender, EventArgs e)
        {
                         
                if (tbhead.ActiveTabIndex == 0)
                {                   
                    //Your code here
                }
                else if(tbselfappr.ActiveTabIndex == 1)
                {
                  //Your code here                 
                }
       }


这篇关于标签建议要求。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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