I did a few searches here but didn't find anything that matches exactly what I'm trying to do, so I hope someone can help me.
I'm wanting to create a tooltip that has a loadondemand user control which allows users to perform a quick search. the user control has a multiview with the first view being the search form, and the second view being the results.
the tooltip loads up the control just fine, but when I submit the search form, it clears it out and submits as if it was empty, telling me that I submitted a blank form. it appears that the values I submit are not being persisted during the ajax postback. how do I fix this?
I tried switching to a regular tooltip (in the scenario above I'm using the tooltipmanagers onajaxupdate to load the control) and it SORT of worked, but if I submit a search, close the tooltip, refresh the page, then do another search, I get viewstate errors because the usercontrol is physically rendered on the page instead of being loaded on demand.
I also tried putting the ajaxupdatepanel as a wrapper to the tooltip and the tooltipmanager. I tried the updatepanel inside the user control and I even tried adding the panel at runtime, then adding the control to the panel. that also doesn't work...
here's some of the code I'm using now:
what is the correct way to load a usercontrol on demand?
I also tried the radwindow but of course that can't load a usercontrol (ascx) and making a whole page seems like an inefficient approach...
hope that was detailed enough, let me know if you need more information. many thanks!
I'm wanting to create a tooltip that has a loadondemand user control which allows users to perform a quick search. the user control has a multiview with the first view being the search form, and the second view being the results.
the tooltip loads up the control just fine, but when I submit the search form, it clears it out and submits as if it was empty, telling me that I submitted a blank form. it appears that the values I submit are not being persisted during the ajax postback. how do I fix this?
I tried switching to a regular tooltip (in the scenario above I'm using the tooltipmanagers onajaxupdate to load the control) and it SORT of worked, but if I submit a search, close the tooltip, refresh the page, then do another search, I get viewstate errors because the usercontrol is physically rendered on the page instead of being loaded on demand.
I also tried putting the ajaxupdatepanel as a wrapper to the tooltip and the tooltipmanager. I tried the updatepanel inside the user control and I even tried adding the panel at runtime, then adding the control to the panel. that also doesn't work...
here's some of the code I'm using now:
protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e) |
{ |
Control ctrl = Page.LoadControl("~/search.ascx"); |
Telerik.Web.UI.RadAjaxPanel pnl = new Telerik.Web.UI.RadAjaxPanel(); |
pnl.Width = new Unit(500); |
pnl.Controls.Add(ctrl); |
e.UpdatePanel.ContentTemplateContainer.Controls.Add(pnl); |
} |
what is the correct way to load a usercontrol on demand?
I also tried the radwindow but of course that can't load a usercontrol (ascx) and making a whole page seems like an inefficient approach...
hope that was detailed enough, let me know if you need more information. many thanks!