This is a migrated thread and some comments may be shown as answers.

ToolTip Load On Demand causes Databinding?

6 Answers 135 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Lance
Top achievements
Rank 1
Lance asked on 01 Jul 2008, 12:38 AM
Hi, I have got the tooltip working great with the load on demand sample provided.  I have a WebUserControl that contains a listview that populates a series of thumbnails, the thumbnails are then linked to the manager, and cause the tooltip. 
The problem is that when the onAjaxUpdate fires, it seems to load the entire WebUserControl again, this includes rerunning the query for the listview, which conceivably could take a bit of time.
Is there a way I can tell it that if it is an AjaxUpdate, to not execute the databinding methods of the control?

Thanks
Lance

6 Answers, 1 is accepted

Sort by
0
Lance
Top achievements
Rank 1
answered on 02 Jul 2008, 04:43 AM
Ok, I think i found out what the problem is. 

It seems that using the load on demand method actually causes the entire page to load on the server for each request.  Needless to say, this makes the popup a bit expensive, especially if the page has complex data queries. 

I am now trying to implement the WebService method, and I am running into another problem.  I am getting an error:

Error executing child request for handler 'System.Web.UI.Page'
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at ViewManager.RenderView(String path, Object data) in c:\inetpub\wwwroot\App_Code\BigThumbnailWebSVC.vb:line 66


It's happening on this line:

HttpContext.Current.Server.Execute(pageHolder, output,

false)

If I step through the code in the debugger, I see that all the methods, and databinding of the .ascx control get executed without any error.

Has anyone seen this problem before?  if so, is there a work around?

Thanks in advance.
Lance

0
Tervel
Telerik team
answered on 02 Jul 2008, 06:43 AM
Hi Lance,

You are correct - each AJAX request (and this is what AJAX is all about) runs the full page lifecycle on the server. This is how AJAX maintains page state, as AJAX is more than partial page updates. You can read more about AJAX and page lifecycle online.

In case you wish to keep using AJAX you might as well check for the state of the page before running your database bindings - so that you avoid binding in the case of OnAjaxUpdate.

In case you wish to use a webservice, we suggest you start off with integrating one of the several RadToolTip examples using WebServices provided in our online demos, and respectively - in your RadControls installation.
Once you have the example up and running into your project, you should be able to easily modify it.
Here are a couple of demos that we recommend:
http://www.telerik.com/demos/aspnet/prometheus/ToolTip/Examples/WebService/DefaultCS.aspx
http://www.telerik.com/demos/aspnet/prometheus/ToolTip/Examples/ImageGallery/DefaultCS.aspx

Best wishes,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Lance
Top achievements
Rank 1
answered on 04 Jul 2008, 03:33 AM
Thanks for the help, I got it working great!

Lance
0
MGrassman
Top achievements
Rank 2
answered on 21 Jun 2009, 05:03 AM
I am getting the same error.  "Error executing child request for handler 'System.Web.UI.Page'"

This is happens when I add anything except and asp:label control.  Do you know why this is?

I used the sample for the webservice tooltipmanager and it works except adding a asp:textbox or asp:button control anywhere in the user control.

Thanks,
0
Lance
Top achievements
Rank 1
answered on 21 Jun 2009, 03:21 PM
Hi,
As I recall, I was never able to get it to work cor
0
Lance
Top achievements
Rank 1
answered on 21 Jun 2009, 03:44 PM
Hi
As I recall, I was never able to get it to work correctly given our application intricacies.
I was able to get it working using the webservices method, but the ToolTip control started getting increasingly complex.  I ended up with a control that had many other possible controls that also contained Asp.Net Ajax controls, some of which were
using update panels, etc.  I found that I couldn't get the update panels to work consistently when using the webservices method, and I ended up with code that I thought would be less than manageable.  I finally decided since the tooltip had become a fairly ubiquitous component in the application, we added a indicator to all queries on pages that use the tooltip to not execute if the callback was for a tooltip.

So in summation, the webservices method worked well for simple tooltips that popped up html, but for more complex tooltips that incorporated user interaction, and client/server communication, then I think the UpdateToolTip method was the easiest way to go. 
Tags
ToolTip
Asked by
Lance
Top achievements
Rank 1
Answers by
Lance
Top achievements
Rank 1
Tervel
Telerik team
MGrassman
Top achievements
Rank 2
Share this question
or