简体   繁体   English

如何将每个标签链接到不同的aspx页面?

[英]How can link each tab to different aspx pages?

I have a application to allow the user upload and download the files. 我有一个允许用户上载和下载文件的应用程序。 Because the security reason, I have separate the application to Upload.aspx and Download.aspx. 由于安全原因,我将应用程序分别设置为Upload.aspx和Download.aspx。

On the default page, I would like use tabs to display upload and download page. 在默认页面上,我想使用标签来显示上传和下载页面。

I am very new in the .net world. 我在.net世界中很新。 This might be a very stupid question, but is it possible using multiview to link to two different pages. 这可能是一个非常愚蠢的问题,但是可以使用multiview链接到两个不同的页面。 All the example I have seen so far, the multiview only show static page. 到目前为止我看到的所有示例,多视图仅显示静态页面。

Can any experts give me some advice how should I approach this problem. 任何专家都可以给我一些建议,如何解决这个问题。

![sample images][1] function Upload() { top.content.location.href = "wox_upload.aspx"; ![样本图像] [1]函数Upload(){top.content.location.href =“ wox_upload.aspx”; } }

<div class="tabContents">
<asp:MultiView id="MultiView1" ActiveViewIndex="0" Runat="server">
    <asp:View ID="View1" runat="server">
        Upload.aspx
    </asp:View>
    <asp:View ID="View2" runat="server">
        Download.aspx
    </asp:View>
</asp:MultiView>
</div>    
</div>
</form>

The whole point of a MultiView is to allow multiple views on the same page. MultiView的全部目的是允许在同一页面上有多个视图。 If you want your tabs to be different pages, then just use links and style them to look like tabs. 如果您希望标签页是不同的页面,则只需使用链接并将其样式设置为标签页即可。

Edit: After looking at your examples again, it looks like you are trying to embed "pages" into the different views. 编辑:再次查看示例后,您似乎正在尝试将“页面”嵌入到不同的视图中。 In this case, you can create a user control for each view and put instances of them where you have the aspx names in your example. 在这种情况下,您可以为每个视图创建一个用户控件,并将其实例放在示例中具有aspx名称的位置。

User Controls generate parts of pages instead of whole pages, and can be included in aspx pages. 用户控件生成页面的一部分而不是整个页面,并且可以包含在aspx页面中。 Here are a couple of links to get you started: 这里有几个链接可以帮助您入门:

How to: Create an ASP.NET User Control 如何:创建ASP.NET用户控件

How to: Include a User Control in an ASP.NET Web Page 如何:在ASP.NET网页中包含用户控件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将不同的aspx页面调用到另一个页面中的 - How to call different aspx pages into a which is in another page 如何在没有单击的情况下每 2 秒在新标签页中打开一个不同的链接 - how to open a different link in a new tab each 2 second without a single click dispform.aspx在新选项卡中打开链接 - dispform.aspx open link in new tab 如何在同一选项卡中重定向页面 - How can I redirect pages in the same tab 如何在每个选项卡上打开不同的模式? - How to open a different modal on each tab? XCode:如何将JavaScript输入到UIWebView中以单击链接(但是每次链接都不同) - XCode: How can I input javascript into UIWebView to click on a link (but the link is different each time) 如何在每个选项卡上显示不同的 leaflet 地图? - How to display different leaflet maps on each tab? Jquery在不同.aspx页上的Click函数 - Click function in Jquery on different .aspx pages 如何使用 createBottomTabNavigator 为每个选项卡使用不同的图标? - How to use different icons for each tab with createBottomTabNavigator? 使用JavaScript在“新建”选项卡中打开其他ASPX页面 - Open a different ASPX page in a NEW tab with JavaScript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM