473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

official alternative to ajax

Hi

I have asked this on the official asp.net forums but no luck so
thought I'd try here

Assume you have a page with a filter control and a grid view and many
other controls on it. When the filter changes you want the gridview to
change but nothing else. In particular all you would like to happen is
for an ajax call to occur and a new grid view to be returned.

Similarily you might have a treeview working asynchronously, you might
have an n'tiered arrangment and if the database disappears you would
want a different control on the page to indicate this, but the treeview
can't be connected to other controls in this manner (can it?)

That kind of situation is possible with Raw html and Ajax. Obviously
ajax calls are easy enough (especially using something like AjaxPro)
and to get the a table back you could just create it and return it.
Similiarly for the treeview example you could return an li/ul structure
normally plus a different control to indicate the error.

So, my question. What is the official way to do things like this. I
suspect the answer is use a postback

ta

(sig: findbyfoldface)

Oct 3 '06 #1
1 1828
I see a lot of people trying to avoid postback, as they feel painting the
page over again is somehow inferior to doing some voodoo in the back with
Ajax. And, in some cases, they are correct. In others, they are creating two
data transports that they have to maintain, simply to avoid a repaint. I do
not see this as a wise use of Ajax, but everyone has their own opinion.

You can talk to controls all day long on the client side and even wire them
to Ajax calls. If you like, you can code your own via the XMLHTTP and with
SOAP even make true web service calls from the client. As long as you emit
the client script from your code beside (behind?) page, you can get the name
of the control, no matter where it is placed, and you can then have one
control pounding on another without a complete postback.

The question is whether you want to maintain this architecture.

PROS
1. It does not completely repaint the page

CONS
1. Harder to debug a mix of client and server script
2. Less maintainable

The main benefit of Ajax (yes, I realize there are many other reasons to use
it ;->) is user accessibility. For example, the google toolbar approach
where a drop down is created on the fly or the ability to change states
based on a country, or fill in a list of cities based on a postal code.
These are very valid reasons to use an asyncrhronous transport. I do not, in
general, believe that gathering a full spreadsheet of data is the best use
for asynch (although there are certainly some specific examples when it
would be wise).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
<co**********@googlemail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
Hi

I have asked this on the official asp.net forums but no luck so
thought I'd try here

Assume you have a page with a filter control and a grid view and many
other controls on it. When the filter changes you want the gridview to
change but nothing else. In particular all you would like to happen is
for an ajax call to occur and a new grid view to be returned.

Similarily you might have a treeview working asynchronously, you might
have an n'tiered arrangment and if the database disappears you would
want a different control on the page to indicate this, but the treeview
can't be connected to other controls in this manner (can it?)

That kind of situation is possible with Raw html and Ajax. Obviously
ajax calls are easy enough (especially using something like AjaxPro)
and to get the a table back you could just create it and return it.
Similiarly for the treeview example you could return an li/ul structure
normally plus a different control to indicate the error.

So, my question. What is the official way to do things like this. I
suspect the answer is use a postback

ta

(sig: findbyfoldface)

Oct 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Yarco | last post by:
I want to use "Ajax" to create my web for hobby. But i don't know whether "Ajax" is mature... And what about with php? Someone have experience on it? ....
4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
0
by: melledge | last post by:
Ajax Developers' Day to Kick Off XTech 2006 Conference Industry experts offer insight into next generation of the Web ALEXANDRIA, VIRGINIA, USA - April 25, 2006 - In response to the rapidly...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
10
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
controlsPlease could some of you here post some of your live examples of AJAX (esp drag panels, collapsable panels, and popup menu.) (It's one thing to talk about how great something is, but it's...
2
by: soni2926 | last post by:
hi, does anyone know of any good books on ajax and asp.net, one that teaches ajax itself before jumping in atlas? I wanted to get an understanding of ajax and how to use it, most books i've seen...
6
by: kj | last post by:
Is it possible to buy the official Python docs in book form? If so, I'd very much appreciate the name(s) and author(s) of the book(s). TIA! kynnjo -- NOTE: In my address everything before...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.