Showing posts with label beta. Show all posts
Showing posts with label beta. Show all posts

Wednesday, March 28, 2012

Extender not working after partial page postback in Beta 2

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 :)

Saturday, March 24, 2012

Exception with Asp.net Ajax 1.0 beta 2 + VS.net

Hi,

I have installed Asp.net Ajax 1.0 beta 2.0 on VS 2005. but whenever I create any new website using asp.net template, VS2005 is throwing following exception. I tried to installed couple of times but everytime VS.net is throwing same exception

"Package Microsoft.Web.AJAXExtension.Designer.VisualStudioToolbox.AJAXExtension,Version=1.0.61025.0,Culture=neutral, PublicKeyToken=null' has failed to load properly (GUID = {CF28F3C7-5DEE-44D1-9B49-E6EB5FD0E186})"

Thanks

The problem is in the?"PublicKeyToken=null".Try?to uninstall?Ajax?Beta?2?and?create?a?new?asp.net?website?to?
check?if?it?works. If?not, maybe?the?problem?is?in?Visual?Studio?.Net?2005. Otherwise?try?to?reboot?your?PC?and?re-install?Ajax?Beta?2?to?your?PC.?Please?give?us?a?reply?after?you?try?it.

Hi ,

Thanks for information. I found some problem in machine.config. after re-installed vs.net 2005, it is workign fine.

Thanks.

Wednesday, March 21, 2012

Even Hello World wont work for me

Hi,

I am creating a simple ASP.NET AJAX Beta 2 application as follows:

<%@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<div>

<spanid="Span1"></span>

</div>

<scripttype="text/javascript">

function pageLoad()

{

var l=new Sys.UI.Label($('Span1'));

l.initialize();

l.set_text("Hello World");

}

</script>

</form>

</body>

</html>

It is NOT WORKING at all :-(. Where am I wrong?

You need install Preview CTP and refer them in the scriptmanager. Label control is in Sys.Preview.UI namespace.

Errors with UpdatePanel & WebPart stuff after upgrade

I recently upgraded from Atlas CTP to Ajax beta 1. I beleive that I properly updated my web.config et. al.; however I keep getting this error regarding the UpdatePanel:

Element 'UpdatePanel' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'AsyncPostBackTrigger' is not a known element. This can occur if there is a compilation error in the Web site.
Validation (XHTML 1.0 Transitional): Element 'Triggers' is not supported.
Validation (XHTML 1.0 Transitional): Element 'ContentTemplate' is not supported.

I can drag the UpdatePanel from the IDE toolbox onto the page, but the Intellisense doesn't work and it causes errors.

On a related note, none of my WebParts stuff is recognized either:

Element 'WebPartManager' is not a known element. This can occur if there is a compilation error in the Web site.
'WebPartZone' is not a known element. This can occur if there is a compilation error in the Web site.

Anyone know what is causing this, and how I can fix?

TIA

hello.

hum...have you changed the web.config entries on the page section?


I've got the same problem. My web.confg page section looks like this:

<system.web><pages><controls>

<addtagPrefix="asp"namespace="Microsoft.Web.UI"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addtagPrefix="asp"namespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addnamespace="Microsoft.Web.Preview.UI"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

<addnamespace="Microsoft.Web.Preview.UI.Controls"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

</controls>

I should be using <asp:UpdatePanel...> NOT<atlas:UpdatePanel...> correct? The only items showing up w/ intellisense are <atlas:AutoCompleteExtender>,<atlas:DragOverlayExtender>,<atlas:ProfileService>,<atlas:Script>,<atlas:TimerControl>, and<atlas:UpdateProgress>.

I'm also a bit lost with what I should have in my toolbox after the migration and adding in the value-add controls. Currently, I still have the ATLAS controls in my toolbox, same as I did from before the migration. Should I have removed these? I also removed the .dll's from my BIN directory before the migration (before the installs) and then added back both "AjaxControlToolkit.dll" and "Microsoft.Web.Preview.dll" after the BETA+ValueAdd+Toolkit installs.

Please help, I am LOST! Thanks!!

--c--


Change you asp tags to something else (Atlas" or "ajax" or whatever... will fix it - its a known bug...

Thanks Jody, that did it!!

Someone should consider updating the Migration Guide document. Step #3 specifically says to use "asp" for the tag. After I had already renamed all my <atlas> tags to <asp> I had to go back and put them back :( ...what a pain.

Thanks again!


Thanks Jodi. That helped me a lot. Just a note here. Change the tag prefix in web.config file pages section as well as in the html design file.

Shaun


I have the same error with the installation of AJAX 1.0, without any beta version installed , and the solution was the same, I changed the tags in the web config and in the html and the problem was solved.


Hi,
I don't know to wich categories this belongs butSmartNavigation="true" seems to cause also a "Sys.WebForms.PageRequestManagerParserErrorException" also.

Just some tip if you looking for hours just as I did ;)

Grtz


I've heard that you do not use SmartNavigation with AJAX (or even VS2005)

Error1Could not load file or assembly Microsoft.Web.Preview or one of its dependencies. Th

Trying to run the samples and this is the error I get. After looking around I see others have gotten this error but with the beta versions.

My install is not a beta release and I have not had any of the betas installed.

Any ideas?

I would look to your web config file or possibly your machine config file. Im betting you somehow got some old beta settings in it. possibly do a search for Microsoft.Web.Preview in your entire solution.

AjaxButter


The other thing i just noticed is you said you were running the samples. Im betting your using an old compilation of the sample files that was meant to use the beta version redownload the sample your using and give it another go.

Sorry for the double post

AjaxButter


Hi,

If you have installed the AJAX Extensions 1.0, the assembly Microsoft.Web.Preview not exists.

You must to replace all the references and assemblies in the samples for run this.

Hope this helps


Replace with what?

How the Microsoft.Web.Preview not exists with the AJAX extension 1.0, you must to work with the System.Web.Extensions assembly and System.Web.Extensions.Design assembly, installed in the Microsoft ASP.NET folder in Program Files folder.

Replace the web.config with the web.config that is generated in a new ASP.NET AJAX Enabled Web Site.

Or replace your web.config with the web.config file that is in the Microsoft ASP.NET folder.



From InstallationInstructions.txt:

Completing the Installation
--------
After downloading and uncompressing the sample files, copy Microsoft.Web.Preview.dll from the
ASP.NET AJAX CTP installation directory (%Program Files%\Microsoft ASP.NET\ASP.NET 2.0 AJAX
Futures January CTP\v1.0.61025\) to the Bin directory of each sample application. For example,
copy Microsoft.Web.Preview.dll to <installation path>\Contacts\Bin, where <installation path>
is the file path where the ASP.NET AJAX Samples were installed.

You must also copy AjaxControlToolkit.dll from the AJAX Control Toolkit directory to the Bin
directory of each sample application. For example, copy <toolkit installation path>
\AjaxControlToolkit\SampleWebSite\Bin\AjaxControlToolkit.dll to <installation path>\Contacts\Bin,
where <toolkit installation path> is the installation path for the AJAX Control Toolkit and
<installation path> is the file path where the ASP.NET AJAX Samples were installed.

Earlier in InstallationInstructions.txt are the download locations for the Futures CTP and the Control Toolkit.