Sunday, March 11, 2012

April CTP problems

hello.

well, regarding number 1, can you build a small page that reproduces that problem? i've built a sample page with 2 panels (one has its mode set to allways; the other to conditional) and it is working as expected here.

regarding 3, maybe that's a designer problem...normally, you use triggers with controls placed outside the panel, but i think nothing prevents you from associating it with a button placed inside another panel (the only scenario where i can see this happening is when you have several panels with the mode set to conditional and clicking on a button inside one of them must update 2 panels - the one where the button is placed and another one which has its mode set to conditional)


#1 - i did simple page and still have this problem, as i said before it was working just fine with March CTP. Now when i click button1 it will show new date/time but banner will disappear

here is a code :

<%

@.PageLanguage="VB"AutoEventWireup="true"CodeFile="Default.aspx.vb"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"><atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="True"/><asp:ButtonID="Button1"runat="server"Text="Button"/><div><atlas:UpdatePanelID="UpdatePanel1"runat="server"Mode="Conditional"><ContentTemplate><asp:LabelID="Label1"runat="server"Text="Label"></asp:Label></ContentTemplate><Triggers><atlas:ControlEventTriggerControlID=Button1EventName=Click/></Triggers></atlas:UpdatePanel> <atlas:UpdatePanelID="UpdatePanel2"runat="server"><ContentTemplate><asp:AdRotatorID="AdRotator1"runat="server"DataSourceID="XmlDataSource1"/><asp:XmlDataSourceID="XmlDataSource1"runat="server"DataFile="~/BannerTop.xml"></asp:XmlDataSource></ContentTemplate></atlas:UpdatePanel></div></form><scripttype="text/xml-script">

<page xmlns:script=

"http://schemas.microsoft.com/xml-script/2005">

<references>

</references>

<components>

</components>

</page>

</script>

</

body>

</

html>

and code behind

ProtectedSub Button1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click

Label1.Text =

Date.NowEndSub

hello.

i'm not able to run your page since i don't have the xml file. however, i've built a small sample which demonstrates that you're getting a postback:

<%

@.PageLanguage="VB" %>

<!

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"><atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="True"/><asp:ButtonID="Button1"runat="server"Text="Button"/><div><atlas:UpdatePanelID="UpdatePanel1"runat="server"Mode="Conditional"><ContentTemplate>

<%

=DateTime.Now.ToString() %></ContentTemplate><Triggers><atlas:ControlEventTriggerControlID="Button1"EventName="Click"/></Triggers></atlas:UpdatePanel> <atlas:UpdatePanelID="UpdatePanel2"runat="server"><ContentTemplate>

<%

=DateTime.Now.ToString() %><asp:Buttonrunat="server"ID="n"Text="oops"/></ContentTemplate></atlas:UpdatePanel></div></form><scripttype="text/xml-script">

<page xmlns:script=

"http://schemas.microsoft.com/xml-script/2005">

<references>

</references>

<components>

</components>

</page>

</script>

</

body>

</

html>

Thanks for code - i have much more advanced page and i think how this work. My point is that after i installed April ver. on my pc even simple code, like the one i sent you doesn't work the way it use to.

xml file is just advertising file , use this

<?

xmlversion="1.0"encoding="utf-8" ?>

<

Advertisements>

<

Ad>

<

ImageUrl>http://www.szukanko.com/images/nmg_front.jpg</ImageUrl>

<

NavigateUrl>http://www.nmgroup.net</NavigateUrl>

<

AlternateText></AlternateText>

<

Keyword></Keyword>

<

Impressions>80</Impressions>

</

Ad>

<

Ad>

<

ImageUrl>http://www.szukanko.com/images/aj_front.jpg</ImageUrl>

<

NavigateUrl>http://www.agnesjurek.com/</NavigateUrl>

<

AlternateText></AlternateText>

<

Keyword></Keyword>

<

Impressions>80</Impressions>

</

Ad>

<

Ad>

<

ImageUrl>http://www.szukanko.com/images/banner_loan.gif</ImageUrl>

<

NavigateUrl>http://exphomeloans.com/</NavigateUrl>

<

AlternateText></AlternateText>

<

Keyword></Keyword>

<

Impressions>80</Impressions>

</

Ad>

</

Advertisements>

Guess what i just downloaded April CTP at home and when i open the page you sent me in VWD i have error creating control - UpdatePanel1. Few minutes ago i did open it with march ctp and was just fine


hello again.

well, my example is running fine here with the april ctp.

regarding your problem, i've tried using th xml file and it seems like you've found another issue related with the usage of the updatepanel. the problem is that the adrotator uses internally the new cache substitution mechanism and due to that it won't generate HTML during the postback started by the panel.

looking at the adrotator api, i see no property that let's you influence this behavior. so, if you have reflector, i'd suggest that you'd copy and write everything and remove the caching parts (ie, build your own adrotator that doesn't perform caching). there might be an easy way to solve this, but right now i don't see any other way to solve this.


thanks , i will work on this,.

BTW your example still shows "error creating control - UpdatePanel1" with april ctp in my VWD (works just fine with march ver.)

Hi TOMCIO,

I guess MS just fucked-up on the April CTP. Since i installed it, my page generates a "Unknown Error", sometimes, when i browse thru records within a Atlas updatepanel.

With the March CTP, it ticked like clockwork. Guess MS needs to upgrade their testfacility, since they state "There is nothing new, just bugfixes" LOL

Regards,

ASPlaceholder


:) - but still i hope, when Atlas will be ready it will be very cool...
Same problem here in the designer. Worked in March CTP:

'Triggers' could not be initiazed.Details: 'Triggers' could not be added to teh collection. Details: Object does not match target type.

Here is the simple example:

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />

<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>

<atlas:UpdatePanel runat="server" ID="up" Mode="Conditional" RenderMode="Inline">
<Triggers>
<atlas:ControlEventTrigger ControlID="DropDownList1" EventName="OnSelectedEvent" />
</Triggers>
<ContentTemplate>
Bla Bla
</ContentTemplate>
</atlas:UpdatePanel>
</form>
</body>
</html>
:) so i'm not the only one :)

I figured out what was wrong :D

Supossedly, MS, made a mistake in the MARCH CTP, because i had to place my <atlas:scriptmanager> in site.master to work properly with my page.

In the April CTP, they might have fixed this, so i had to edit my site in order to get it working again.

Now i have to place a <atlas:scriptmanager> on every page. My page wWorks fine now.

Atlas rulez! No more postback's :D Keep up the goodworks.

Regards,

Mr. ASPlaceholder

P.s. I love caching! It is indeed one of the best features of .NET :D They still have to activate the databasecache ( <sqlcachedependency> ) on the server though....

No comments:

Post a Comment