ASP.Net中的部分页面加载 [英] Partial Page Loads in ASP.Net

查看:61
本文介绍了ASP.Net中的部分页面加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的第一个问题已经到了;)

这是关于我当前正在创建的Web应用程序,实际上是我目前正在使用的Web应用程序.我还是ASP.Net的新手.
我有以下情况:

母版页托管该站点的菜单.菜单分为主要和次要主题.在每个主要条目上,我都会进行整页加载.对于次要条目,我想进行部分页面加载.

目前,我有3个想法如何实现部分负荷

1.使用IFrame.实际上,我想避免这种情况.此外,在内容和母版页之间的交互方面,我可能会遇到麻烦.

2/3.使用UpdatePanel.
2.以编程方式将页面内容创建为更新面板的项目模板.但是,我不喜欢这种方法.

3.将页面创建为UserControls并将其加载到UpdatePanel.好吧,我既不知道这是否行得通,也不知道这样做是否是好习惯".


在撰写本文时,我在相关条目"中注意到了这一个 UFrame:UpdatePanel和IFRAME结合的优点 [< ^ ].这听起来很有趣,而且似乎是我正在寻找的解决方案.是否有人对UFrame有经验?或者还有其他可以使用的可能性/想法?

在此先感谢

Hey guys,

the time has come for my first question ;)

It is about a web application I''m currently creating, actually with which I''m currently playing around. I''m still new to ASP.Net.
I have the following scenario:

A master page hosts a menu for the site. The menu is divided into major and minor topics. On each major entry I do a full page load. For the minor entries I''d like to do a partial page load.

Currently I''ve 3 ideas how to realize the partial loads

1. Using IFrames. Actually I want to avoid it. In addition, I will probably run into trouble when it comes to interaction between the content and the master page(s).

2/3. Using an UpdatePanel.
2. Creating the page content programmatically as item template for the update panel. However, I don''t like this approach.

3. Creating the pages as UserControls and load them into the UpdatePanel. Well, neither I know if this will work nor if it is "good practice" doing so.


While writing this I noticed in the ''Related Entries'' this one UFrame: goodness of UpdatePanel and IFRAME combined[^]. It sounds very interesting and seems to be the solution I''m looking for. Does anyone have experience with the UFrame? Or are there any other possibilites/ideas I could use?

Thanks in advance

推荐答案

您可能可以使用
页面方法 [ JQuery [
You can probably use
Page Methods[^] for this task. Or you can also use JQuery[^].


这篇关于ASP.Net中的部分页面加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆