ASP.Net 选项卡控件:通过单独的 ASPX 文件单击加载内容

发布于 2024-12-20 07:36:09 字数 435 浏览 4 评论 0原文

我正在寻找一种使用选项卡控件的方法,以便有一个 TabPanel,并且当单击选项卡时,TabPanel 会从单独的 ASPX 文件填充。如果我有三个选项卡,则 tab1.aspx 用于选择选项卡一时的内容,tab2.aspx 用于选择选项卡二时的内容,依此类推。

我发现了许多关于将所有内容都塞进一个页面的教程。我还阅读了如何:使选项卡控制面板“按需”加载(使用隐藏控件)。但我还没有遇到过通过链接或回发加载部分视图的情况。

有人知道 ASP.Net 视频或解释良好的教程/博客的链接吗?

杰夫

I'm looking for a way to use a tab control such that there is a single TabPanel, and when a tab is clicked the TabPanel is populated from a separate ASPX file. If I have three tabs, then tab1.aspx is used for content when tab one is selected, tab2.aspx is used for content when tab two is selected, and so on.

I've found a number of tutorials on cramming everything into a single page. I've also read How To: Make Tab control panels load "on-demand" (which uses hidden controls). But I have not come across loading a partial view via a link or postback.

Would anyone know of a link to an ASP.Net video or well explained tutorial/blog?

Jeff

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痴情 2024-12-27 07:36:09

我不确定这是否可能。

但我建议您将所有 aspx 文件合并为一个(您可以将每个文件放在 PlaceHolder 或面板中),然后在需要时使它们可见。

I'm not sure that it is possible.

But I suggest that you combine all of your aspx files in one (you can place each file in PlaceHolder or Panel) and then make them visible when you need it.

黒涩兲箜 2024-12-27 07:36:09

您可以使用 IFRAME 来加载不同的页面内容。

按 T​​ab1 时,您必须加载 Tab1.aspx。为此,您必须使用 IFrame 来加载内容。如果您的内容是静态的,那么您可以通过 System.IO.ReadFile() 获取内容;如果您有动态内容,则可以使用 Iframe 或用户控件来加载。

您还可以实现多视图以接近您的方式并将其放入更新面板并将多视图设计为 TAB 面板。

You can use IFRAME for different page content load.

On press Tab1 you have to load Tab1.aspx. For that you have to IFrame to Load Content. If your Content is static then you can get content by System.IO.ReadFile(); and if you have dynamic content then you can use Iframe or User Control to load.

You can also Implement the Multiview to approach your way and put it in Update panel and design the multiview as TAB panel.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文