构建AJAX应用程序 [英] Building AJAX application

查看:77
本文介绍了构建AJAX应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用AJAX和C#构建一个小型网络应用程序。

有10种不同形式/这个项目的窗户。我的基本想法是,有一个主窗口,我将从主窗口打开其他窗口。



我正在尝试将AJAX实现到此,使用AJAX控件工具包中的大多数AJAX控件(如,CollapsiblePanel,ModalPopup,RoundedCorners等)



我创建了10个不同的页面。虽然我想从主窗口中打开新窗口,但我可以调用不同的页面作为弹出窗口并完成工作。

但是如果我全部使用AJAX,那么不同的页面必须是AJAX Panel,并且只有在我想使用ModalPopup工具时才应该在主页面上。我必须在一个主页面中将所有这些不同的页面创建为AJAX面板。



我的问题是,这不会使页面加载速度变慢,因为现在所有10页的内容都在1页上。





你能不能对此有所启发并指导我。

我希望自己清楚明白。请原谅我的英语。





谢谢,

迪帕克

Hi all,

I am building a small web-application using AJAX and C#.
There are some 10 different forms/windows in this project. My basic idea is, there is gonna be one main window and I''ll open other windows from within that main window.

I am trying to implement AJAX into this, using most of the AJAX controls from the AJAX control toolkit (like, CollapsiblePanel, ModalPopup, RoundedCorners etc.)

I created 10 different pages. Though I wanted to open new windows from within main window, I can invoke different pages as pop-up and do the work.
But if I am using AJAX all, the different pages has to be "AJAX Panel" and should be there on the main page only if I want to use ModalPopup tool, for instance. And I have to create all those different pages as AJAX panel in one main page only.

My question is, Isn''t that going to make that page load slower, because the content of all the 10 pages is on 1 page now.


Can you please throw some light over this and guide me.
I hope I made myself clear. Please pardon my English.


Thanks,
Deepak

推荐答案

你告诉你开发了10个不同的页面和1个主页面。从该主页您需要加载该页面。我猜你在iframe上使用ModalPopupExtender。如果是这样,他们是不同的,不加载主页的页面。它们将按需呈现,当关闭弹出窗口时,它们将会消失。但是那样用ajax方式页面到页面的沟通将是困难的。



另一种方法可能是你有10个不同的asp面板(div或者它可能是用户控件)所有都在MainWindow里面。您只需按需显示隐藏并获取ajax优惠。如果是这样,那么它当然会延迟主页面渲染,因为主窗口已经变得笨重,包括内部的asp面板。但认为这样做的好处。

您可以轻松快速地与asp面板进行通信(添加/更新/删除/显示/隐藏)MainPage。因为在呈现页面时,所有面板内容也会呈现。像任何缓存实现一样思考。加载缓存时,它会减慢进程的速度,但一旦加载,它将提供性能优势。因此,您将根据需求,利益和损失等考虑做出决定。
You told you develop 10 different page and 1 Main Page. From that mainpage you ondemand load that page. I guess you use ModalPopupExtender with iframe. If so they are different and not load their page with main page. They will render on demand and when close your popup then they will destroy. But in that way page to page communication with ajax way will be difficult.

Another approach may be you have 10 different asp panel(div or it might be user controls) and all are inside MainWindow. You just show hide that on demand and take ajax benefit. If so then of course it will delay Main Page render because Main Window already became bulky for including that asp panels inside. But think that the benefits.
You can easily communicate(add/update/remove/show/hide) MainPage with asp Panels very easily and quickly. Because when page is rendered then all panels content also render. Think like any caching implementation. When cache is loaded it will slow down the process but once loaded it will provide performance benefit. So you will take decisions based on requirement, benefit and loss etc consideration.


这篇关于构建AJAX应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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