I have a dundas chart with ajax zooming and scrolling enable.
It works fine in a webform page. But once I put in a user control and called it from another page I get this error -
the target 'ctl00$ContentPlaceHolder1$uc2$chartVisits' for the callback could not be found or did not implement ICallbackEventHandler.
-when I try to use the zoom and scroll functionality.
What can I do to resolve this problem.
Thank You.
I've seen this error when dynamically adding controls that use AJAX. Make sure you're adding any controls in the OnInit method, or during the Page_Init event. That has solved this problem for me in the past.
Related
I'm using bootstrap popover in a update panel in my asp page that it doesn't work. when I put it out of update panel it's OK, please help me.
There's not a lot to go on here, but when I've run into similar issues in the past it's been because the update panel does a partial postback for an update and the javascript isn't getting bound because the markup changed or was added after the page load. You will need to rebind the trigger (initialize the popover) when the AJAX panel updates using the methods described in this question.
I have RadTabPanel1 in my page using a MasterPage, when i click on a tabpanel, it will add # to the address bar (eg: localhost:8080/SiBase/Default.aspx#).
Until i trigger a postback from button or any other control before the tab opens. This works fine in a normal page (without masterpage).
Please what can I do to resolve this issue? Thanks..
I added an Ajax Extenders that was not in use which was causing postback problems, I just removed them and it worked fine. Thanks
I have an asp.net page with a timer embedded in an UpdatePanel (UpdateMode="Conditional", ChildrenAsTriggers="false"). The timer is responsible for updating some components of that page every few seconds.
There are also some HyperLink controls on the page and they open a JQueryMobile dialog when clicked (data-rel="dialog"). The problem is that the timer i mentioned causes postback every few seconds. So when a dialog is opened and then closed, the first such postback after then causes the dialog to open once again.
Using the rel="external" as another attribute of the HyperLinks I mentioned solves the problem, but this is no solution for me. This causes full redirection to the dialog page instead of showing it using AJAX (as if on top of current page).
My idea was to stop the timer when any hyperlink is clicked. This solves the problem, but I have no idea how to start the timer again when the dialog closes. Is it possible to detect when a JQueryMobile dialog is closed? I know, this sounds stupid, but I can't come up with a better idea. Will you help me, please?
So basically, I don't want the JQueryMobile dialog page to show up for the second time after a timer tick. Could you please advise me how to achieve that?
jQuery Mobile with asp.net Web Forms and an UpdatePannel? This just sounds like a horrible combination.
jQuery Mobile and Web Forms fundamentally don't work well together. The specific issue that Web Forms requires a single <form /> element that wraps all controls (and most content). jQuery Mobile attempts to build up the DOM with "virtual" pages via ajax loading. This breaks the PostBack model by submitting the entire form instead of the individual form found within each page template. Now throw UpdatePanels in there...
Your only hope is go exclusively with Single page templates and to disable all ajax loading data-ajax="false" on both links and forms. And just say no to UpdatePanels.
asp.net MVC would give you much greater control over these issues.
Been pulling my hair out and doing a bit of looking on the web to try and figure out an elegant solution to my issue.
I have a ProductImages.aspx page. It shows all of the images associated with that product in a dynamically created list. Events are wired up to each picture to allow you to update it.
This works fine.
However, I have an option at the end which lets me add a new image. This is a button which fires off a call to the AddImage method.
Now what is happening is that the original controls are being create and added to the page with events. Then the button event if fired which recreates all of the existing image controls and a new one. Add this point the new image control create after the OnInit does not have events attached due to the events being added AFTER the OnInit.
I can do a Response.Redirect to reload the page and fire the OnInit to wire up the events again but this seems very inelegant and destroys the point of using update Panels.
Any ideas?
I'm thinking you could always load the picture upload control in a div and have a Javascript link to toggle the display attribute of the div.
Or perhaps use CollapsiblePanels from the AjaxToolKit to hide and show the upload form.
I think either of those ways would be more elegant than doing a post back (even if it's in an UpdatePanel) just to retrieve the picture upload form.
Your questions makes it sound like you're saying that you can't put the controls in OnInit because it is only fired on the first load of the page. This is not the case - OnInit is fired each time the page is loaded (including postbacks), so you can re-create your controls there even when using an update panel.
One property that is different between the initial load and the postbacks is the Page.IsPostback property, which you can use to just perform actions on the first load of the page.
I have a panel on an aspx page which contains an UpdatePanel.
This panel is wrapped with both a PopUpControl Extender as well as a DragPanel Extender.
Upon initial show everything works fine, the panel pops up and closes as expected and can be dragged around as well.
There is a linkbutton within the UpdatePanel which triggers a partial postback. I originally wanted to use an imagebutton but had a lot of trouble with that so ended up using the linkbutton which works.
Once the partial postback is complete I can no longer drag the panel around.
I would love to hear suggestions on how to fix this.
Has anyone else encountered this problem?
What did you do about it?
Do you know of any other way to accomplish this combination of features without employing other third party libraries?
Take a look at when the drag panel extender and popup control extender actually extend your panel.
Chances are those extenders work on an initialization event of the page. When the update panel fires and updates your page the original DOM element that was extended was replaced by the result of the update panel. Which means that you now have a control that is no longer extended.
I don't really know of an easy solution to this problem. What will probably work is if you can hook into an event after the update panel has updated the page and extend the panel again.