Answered by:
Using ajax instead of postback

Question
-
User1980140492 posted
Guys,
I've successfully implemented a custom and pretty advanced cascading filtering based on Stephen's post:
http://csharpbits.notaclue.net/2009/05/communicating-between-fieldtemplates-in.htmlIt's a nice solution, but it would be even nicer without all the postbacks.
As I'm writing this you should know that my ajax knowledge is 0.0000% ... but to keep it simple just think of one checkbox which causes one other field to get filtered values, just like Stephen's sample. What would it take to replace the autopostbacks by some kind of Ajax code ?
Thanks in advance,
- YannickThursday, July 7, 2011 10:52 AM
Answers
-
User-610330605 posted
You can start by adding a reference to AjaxControlToolKit.
Add a ScriptManager to the page above any AJAX dependent control.
Add an UpdatePanel in the page which encloses the Controls for partial postback.
Check out this simple Hello World example. http://ajax.net-tutorials.com/basics/hello-world/
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 7, 2011 11:32 AM -
User-330204900 posted
Hi Yannick, as the controls need to talk to each other they need to post back, have you tries tungin on partial render in Site.master?
<%-- TODO: Enable partial rendering by setting the EnablePartialRendering attribute to "true" to provide a smoother browsing experience. Leaving partial rendering disabled will provide a better debugging experience while the application is in development. --%> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false" />
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 7, 2011 11:54 AM
All replies
-
User-610330605 posted
You can start by adding a reference to AjaxControlToolKit.
Add a ScriptManager to the page above any AJAX dependent control.
Add an UpdatePanel in the page which encloses the Controls for partial postback.
Check out this simple Hello World example. http://ajax.net-tutorials.com/basics/hello-world/
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 7, 2011 11:32 AM -
User-330204900 posted
Hi Yannick, as the controls need to talk to each other they need to post back, have you tries tungin on partial render in Site.master?
<%-- TODO: Enable partial rendering by setting the EnablePartialRendering attribute to "true" to provide a smoother browsing experience. Leaving partial rendering disabled will provide a better debugging experience while the application is in development. --%> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false" />
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 7, 2011 11:54 AM -
User1980140492 posted
That does the trick :) awesome!
Cheers,
- YannickFriday, July 8, 2011 6:30 AM