[英]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.