简体   繁体   English

如何在内容或更新面板中加载aspx

[英]How to load aspx inside content or update panel

Sorry for this pretty simple question: I have a Master Page with a menu located at left, and an update panel inside a ContentPlaceHolder located at right. 很抱歉这个非常简单的问题:我有一个主页面,左边是菜单,右边是ContentPlaceHolder内的更新面板。 When I click a menu item, and use NavigateUrl property, it loades a page in the whole browser screen. 当我单击一个菜单项并使用NavigateUrl属性时,它会在整个浏览器屏幕中翻页。 How can I make it loades inside a certain region, in this case the update panel? 如何在某个区域内进行修改,在这种情况下是更新面板?

Thanks in advance 提前致谢

The quick and dirty answer is to use an iframe . 快速而肮脏的答案是使用iframe

I personally am not a big fan of iframe s and would recommend that if you are truly looking for a "load in place" type solution that you research a more client-side solution than ASP.NET WebForms using UpdatePanels , such as jQuery/AJAX/Templating, KnockoutJS, BackboneJS, AngularJS or Ember.js. 我个人不是iframe的忠实粉丝,并建议如果你真的在寻找一个“加载到位”类型的解决方案,你研究一个比ASP.NET WebForms using UpdatePanels更客户端的解决方案,比如jQuery / AJAX / Templating,KnockoutJS,BackboneJS,AngularJS或Ember.js。

As a different option you can convert the aspx page into a UserControl. 作为一个不同的选项,您可以将aspx页面转换为UserControl。 Then you can load the UserControl in the update panel. 然后,您可以在更新面板中加载UserControl。

If you also want to have an aspx page you can create a different aspx page that contains that same UserControl. 如果您还想拥有一个aspx页面,您可以创建一个包含相同UserControl的不同aspx页面。

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

相关问题 如何将一个aspx页面放在另一个aspx页面的更新面板中 - how to place an aspx page inside update panel of another aspx page 如何在面板/视图中显示aspx页面? - How to display aspx page inside a Panel/View? 如何将HTML页面的选定文本发送到同一个ASPX页面,而不是另一个面板? - how to send selected text of an HTML page which is inside an aspx panel to the same aspx page but another panel? 如何将asp:Content加载到ASPX的子页面中 - How to load asp:Content into a subpage in ASPX 将aspx页面加载到<ext:Panel> - Load aspx page into <ext:Panel> 如果页面 abc.aspx 包含用户控件,如何使用更新面板? - How to work with update panel, if the page abc.aspx contains usercontrols? 如何在我的aspx页面的面板内显示视频 - how to show a video inside the panel of my aspx page 如果不在更新面板中,如何更新userconrol的内容? - How to update the content of a userconrol if is outside the update panel? 使用jQuery ajax在母版页中加载后,带有更新面板的aspx页不起作用 - aspx page with update panel not work after load in master page with jQuery ajax 当按钮位于更新面板内时,如何从内容页面调用母版页方法? - How do you call master page methods from a content page when the button is inside an update panel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM