I'm using Telerik (for ASP.NET AJAX) RadMultiPage controls to produce nested tabs and I would like to link to a specific tab from another page. But I couldn't find a proper way.
我用Telerik (ASP)。RadMultiPage控件可以生成嵌套制表符,我想从另一个页面链接到一个特定制表符。但我找不到合适的方法。
Here is my code
这是我的代码
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="RadMultiPage1" SelectedIndex="0">
<Tabs>
<telerik:RadTab Text="ParentTab1"></telerik:RadTab>
<telerik:RadTab Text="ParentTab2"></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
<telerik:RadPageView ID="ParentTab1" runat="server" >
<telerik:RadTabStrip runat="server" ID="RadTabStrip2" MultiPageID="RadMultiPage2" SelectedIndex="0">
<Tabs>
<telerik:RadTab Text="ChildTab1"></telerik:RadTab>
<telerik:RadTab Text="ChildTab2"></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage2" SelectedIndex="0" runat=server>
<telerik:RadPageView ID="ChildTab1" runat="server">
<%--ChildTab1 Content--%>
</telerik:RadPageView>
<telerik:RadPageView ID="ChildTab2" runat="server" >
<%--ChildTab2 Content--%>
</telerik:RadPageView>
</telerik:RadMultiPage>
</telerik:RadPageView>
</telerik:RadMultiPage>
And it looks like:
它看起来像:
screenshot http://oi59.tinypic.com/14wvj89.jpg
截图http://oi59.tinypic.com/14wvj89.jpg
The question is how could I insert a link exactly points to "ChildTab2" into another page.
问题是如何将指向“ChildTab2”的链接插入到另一个页面。
1 个解决方案
#1
2
The quick answer is "You can't".
快速的回答是“你不能”。
The tabs are simple HTML and JavaScript, when you click a tab, the display of the PageViews is switched, that's all. These are not anchors that you can switch to.
标签是简单的HTML和JavaScript,当你点击一个标签时,页面视图的显示会被切换,仅此而已。这些不是你可以切换到的锚。
What you can consider is adding a querystring parameter that you can work with in the code-behind and set the selected tab as desired.
您可以考虑添加一个querystring参数,您可以在代码背后使用它,并按需要设置所选的选项卡。
Of course, you can do this on the client, but accessing the controls may be a tad harder, and so is parsing the URL (whether it is a querystring or a hash).
当然,您可以在客户机上执行此操作,但是访问控件可能有点困难,解析URL也是如此(无论是查询字符串还是散列)。
#1
2
The quick answer is "You can't".
快速的回答是“你不能”。
The tabs are simple HTML and JavaScript, when you click a tab, the display of the PageViews is switched, that's all. These are not anchors that you can switch to.
标签是简单的HTML和JavaScript,当你点击一个标签时,页面视图的显示会被切换,仅此而已。这些不是你可以切换到的锚。
What you can consider is adding a querystring parameter that you can work with in the code-behind and set the selected tab as desired.
您可以考虑添加一个querystring参数,您可以在代码背后使用它,并按需要设置所选的选项卡。
Of course, you can do this on the client, but accessing the controls may be a tad harder, and so is parsing the URL (whether it is a querystring or a hash).
当然,您可以在客户机上执行此操作,但是访问控件可能有点困难,解析URL也是如此(无论是查询字符串还是散列)。