PDA

View Full Version : [EXAMPLE] AjaxEvent Usage Summary



geoffrey.mcgill
Oct 08, 2008, 8:56 AM
A new example has been added to the explorer which demonstrates adding AjaxEvents to various Controls and html elements.

http://examples1.ext.net/#/AjaxEvents/Basic/Summary/

Personally I feel this is the most exciting feature of the whole Coolite Toolkit (or any ASP.NET webcontrol... Microsoft or 3rd party). The connection between the server and client is so easy to bridge now.

Let me know what you think.

Hope this help.

Rod
Oct 08, 2008, 11:52 AM
Personnally I find it simply awesome :/
Way better than having to add shared web methods. Now the drawback is that u post the full viewstate (I think at least), which will obviously slow the response time on page with huge viewstates (tho that's our job to avoid that :p).
But then I'm wondering about a few things.
Will it be gziped if gzip is enabled on server? Can it be automatically gzipped (by you :p)?
How will techniques such as this one : http://forums.asp.net/p/1293397/2513235.aspx works? I would be happy to try it, but I dn't really have the time right now, so I'm mainly asking for thoughts, as I intend to try it by myself later.
During some tests, I tried usig Response.Redirect which seems to fail (doesn't really surprise me, but maybe I just made a mistake). Is is really supposed to fail or not? If so, how would you handle redirect in such case?
Thx for reading this crap, big thx if u take time to answer :)

jchau
Oct 08, 2008, 12:05 PM
I posted this question before but didn't get a response. Let's try again =P.

What are the pros and cons of Coolite's AjaxEvent compared to WebService/PageMethod?? Isn't WebService/PageMethod still going to be faster? Does AjaxEvent post form data back to the server? With fiddler, I only see Viewstate being posted back in the example page.

Rod
Oct 08, 2008, 12:09 PM
As far as i know, PageMethod doesn't post ViewState back (which explains why you need a shared method or can't access to your page/user control controls), so I guess it "should" be faster. Can't promise tho :p

Vladimir
Oct 08, 2008, 12:39 PM
An each ajax request can be tuned individually.

The AjaxEvent has next two properties:

Type: possible values (Load, Submit). If Load then the form will not be be submitted on server (only user params). If Submit then form will be submit (including ViewState). I think we will add (in v0.7.0) one more type value: Submit without ViewState

EnableViewState: if true then server will return ViewState after ajax event. Default value is false which mean that ViewState will not be returned from server

Example


<Click Type="Load" EnableViewState="true"></Click>

Timothy
Oct 08, 2008, 7:42 PM
From your example we always need to EnableViewState="True" in order to retrieve the ViewState from a AjaxEvent response? Even when we have Type="Submit"selected?

Would be nice to only have to enable Type="Load" and opt out of EnableViewState if we want to :)

Thanks

stkmks
Oct 09, 2008, 8:29 PM
Hi,

Just wondering exactly whats possible to effect in the response of an ajax event.


From looking at the examples and playing around myself, im not having much luck with anything other than setting the text of an ext: control.


Any chance you could provide a list of whats possible now and will be in the future. I appreciate that coolite is still in development :)


Im experimenting with (and would really like to) building coolite controls into my webapp. Given the current state of the codebase, would the best approach be to build in the existing controls using postback, then add full ajax support as necessary? Looking at what i just typed, seems to make sense ;)


Thanks for your help,


marcus

JMan
Oct 10, 2008, 11:55 PM
I too am interested in 'what' can be done, I am still trying out the toolkit as well. The examples are good. But I am still a little unclear on what can be done between the client and server. I see alot of "after" and 'before' events but I am unsure how to hook into them or how I would use them. I guess I'm missing the overview of how exactly how communication takes place between the client controls and server methods. Is there any documentation that goes into that?

thanks,