如何选择TabCointainer选项卡(AjaxToolKit) [英] How to select a tab from TabCointainer (AjaxToolKit)

查看:242
本文介绍了如何选择TabCointainer选项卡(AjaxToolKit)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能选择一个标签编程一个TabContainer的吗?而且我怎样才能得到所选标签?

How can I select a tab programmatically of a TabContainer? and also how can I get the selected Tab?

推荐答案

下面是 TabContainer的的属性从的这里

TabContainer Properties

    ActiveTabChanged (Event) - Fired on the server side when a tab is changed after a
postback
    OnClientActiveTabChanged - The name of a javascript function to attach to the
client-side tabChanged event
    CssClass - A css class override used to define a custom look and feel for the tabs.
See the Tabs Theming section for more details.
    ActiveTabIndex - The first tab to show
    Height - sets the height of the body of the tabs (does not include the TabPanel
headers)
    Width - sets the width of the body of the tabs
    ScrollBars - Whether to display scrollbars (None, Horizontal, Vertical, Both, Auto)
in the body of the TabContainer
    TabStripPlacement - Whether to render the tabs on top of the container or below
(Top, Bottom)

样本code相关链接:

Useful links with sample code:

http://sandblogaspnet.blogspot.com/2009/04/setting-focus-to-particular-tab-in.html

tabContainer = tabContainer.control;
//Retrieving the tab using the get_activeTab method/property
var tab = tabContainer.get_activeTab();
var headerText = tab.get_headerText();
alert(headerText);
//Another way of retrieving the tab using the get_previousTab method/property
tab = tabContainer.getPreviousTab();
alert(tab.get_tabIndex());

3技巧与AjaxControlToolkit的TabContainer的控制工作

这篇关于如何选择TabCointainer选项卡(AjaxToolKit)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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