Hi
I have a custom extender that worked fine under Beta 1 but has problems withUpdatePanels and partial page postbacks under Beta 2.
It appears that the behavior.js script resource associated with the extender is not send to the client after a partial page postback. The 'initialize' function on the behavior is not called after the partial page postback. The 'dispose' function is call the first time the partial page postback is execute so I would assume that the 'initialize' function should be called after the partial page postback has completed in order for the event handlers to be hooked up again.
The extender works perfectly when used outside of anUpdatePanel.
Any suggestions would be appreciated.
Cheers
I have the same problem with the collapseable panel. Did you find a solution?I'm getting extremely annoyed, I've been searching and trying things for three days straight related to this. It seems that with Beta 2 your custom extender registers the $create() statement fine and is intialized properly within an update panel, but when you do a partial postback of this updatepanel the dispose method is never called, and the initialize is never recalled, so while you have the appropriate HTML Dom elements you no longer have anything hooked up to your client extender. I have seen SEVERAL posts about this in all the forums and not one response from microsoft. THis is the biggest issue keeping us from moving forward with our development. I at least want someone to acknowledge it's a problem. PLEASE MICROSOFT I'M BEGGING YOU TELL ME WHY MY CONTROLS WON'T DISPOSE FOR THE LOVE OF PETE.... okay I feel better now, but only slightly because my controls still don't work.
I also noticed this is a problem with any of the tookit extenders, I threw a watermark extender in anupdate panel and it works fine on the initial load, but fails to after a partial postback.
I have a sample app ready to go, very simple and it clearly identifies the problem, one page with an updatepanel a scriptmanager and a watermark extender and a button inside the update panel. When the page loads, the extenderhas the watermark text in it, when you hit the test button performing a partialpostback, no more watermark. Problem is I can't include it, anyone know how?
hello.
can you put it somewhere and send us the link?
I don't really have a public site I can put it to. I tried to attach it to the thread but it said I didn't have permission. Any ideas, if not send me a private reply and I'll send it to you if you have a place you can put it. Luckily it's a real simple website with only one page but it doe show the problem.
hello.
send it to my mail (get it from the profile) and refer the thread id on the mail message.
Thanks to Luis doing some work this weekend he figured out that in the simple example all that was needed was to change the enableeventvalidation to true and this caused the extender to work properly. However, now that I flip that in my main application I'm getting this error.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@.Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the
data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
So the pain continues. Luis did make a point I agree with, whether or not EnableEventValidation="true" should not hinder these controls from working, specifically when to get the cascadingdropdown to work it needs to be set to false as I've seen in other posts. I'm opening a bug in codeplex this morning, but if anyone has been able to get their custom controls to work within an update panel please let me know. These bugs or incosistencies or whatever they are, are killing us. Everything was working great till this Beta release.
I've entered this as a bug
http://www.codeplex.com/WorkItem/View.aspx?ProjectName=AtlasControlToolkit&WorkItemId=5795
reading this post 2 days agou would have saved me 2 days of debugging (if only it would have been posted 2 days ago)
Anyway, I totally confirm this issue and I am voting it now on codeplex (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=AtlasControlToolkit&WorkItemId=5795)
Thank god I no longer feel alone :) I've been trying everything for about 5 days straight now, our development has totally come to a crawl. I have a workaround in ming I am going to try this week, it'll be a temporary hack but I'll pst it when I'm done if it works.
zuke004:
Thank god I no longer feel alone :) I've been trying everything for about 5 days straight now, our development has totally come to a crawl. I have a workaround in ming I am going to try this week, it'll be a temporary hack but I'll pst it when I'm done if it works.
:)
You are not alone mate! My last 2 days were hell because of this issue. would you mind to share the temporary hack you had in mind?
And I am getting all my friends and colleagues that I've dragged with me into this issue trying to spot the problem to vote the bug you've logged on codeplex so that it gets prioritized
hello.
well, unfortunatelt, this seems to be an internal error which is very difficult to debug, i've found where the problem, but i still haven't understood why the code was written like that. the problem lies in the renderformcallback method of the pagerequestmanager class.
here's the code that is responsible:
if (this._owner.IPage.EnableEventValidation)
{
HtmlTextWriter writer2 = new HtmlTextWriter(TextWriter.Null);
foreach (Control control1 in containerControl.Controls)
{
control1.RenderControl(writer2);
}
}
rendering the control is necessary for the watermark extender to add the necessary scripts into the page (they'll ony be added if the render method of the scriptmanager control renders itself, ie, if its render method is called and this will only happen when EnableEventValidation is true as you can see from the previous code).
since this is a private auxiliary class used by scriptmanager, there's not much that can be done for now...
Hi Luis and thank you very much for your answer.
Could you recommend any partial/temporary solution that we could use for the moment (sorry for being lazy and asking such questions :)
No comments:
Post a Comment