Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Wednesday, March 28, 2012

UpdateProgress Problem

I am running Atlas on a Win 2K3 Server and I installed the latest version of Atlas today. I created a simple hello world page, which runs as expected. However, when I add an UpdateProgress control and try to view the page, the following two alert boxes appear (in order):

"Assertion Failed: Could not resolve reference to object named "_pageRequestManager" for "dataContext" property on object of type "Sys.Binding"

"Assertion Failed: No data context available for binding with ID"" and dataPath "inPostBack" on object of type "Sys.Binding"

The ASPX page that works correctly is:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
lbTest.Text="Hello World!";
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Atlas Test</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager id="ScriptManager1" runat="server"></atlas:ScriptManager>

<atlas:UpdatePanel id="update1" runat="Server" Mode="Conditional">
<ContentTemplate>
<asp:Label id="lbTest" runat="server">This is a test</asp:Label>
<asp:Button id="Button1" runat="server" Text="Test Atlas" OnClick="Button1_Click" />
</ContentTemplate>
</atlas:UpdatePanel>
</form>
</body>
</html>

The ASPX page that fails is:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" %>

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
lbTest.Text="Hello World!";
}

</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Atlas Test</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager id="ScriptManager1" runat="server"></atlas:ScriptManager>

<atlas:UpdatePanel id="update1" runat="Server" Mode="Conditional">
<ContentTemplate>
<asp:Label id="lbTest" runat="server"></asp:Label>
<asp:Button id="Button1" runat="server" Text="Test Atlas" OnClick="Button1_Click" />
</ContentTemplate>
</atlas:UpdatePanel>

<atlas:UpdateProgress ID="ProgressIndicator" runat="server">
<ProgressTemplate>
<div id="progressArea">
Loading the data, please wait... <asp:Image ID="LoadingImage" runat="server" ImageUrl="~/img/spinner.gif" />
</div>
</ProgressTemplate>
</atlas:UpdateProgress>
</form>
</body>
</html>

My web.config file looks like this:

<?xml version="1.0"?>

<configuration>

<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
</sectionGroup>
</configSections>

<microsoft.web>
<converters>
<add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>
</converters>
</microsoft.web>
<system.web>
<compilation debug="true"></compilation>

<pages>
<controls>
<add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
</controls>
</pages>

<authentication mode="Forms" ></authentication>

<xhtmlConformance mode="Strict"/>

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
</httpModules>

</system.web>
</configuration>

I pulled the UpdateProgress directly from a sample online, and I can't figure out why it doesn't work.

Can anyone spot any obvious errors? Are there trust issues related to the DLL that holds the UpdateProgress class?

Any help, leads or links would be helpful - thanks.

Update - the first example I posted above DOES NOT WORK. The postback was so fast I mistakenly thought it was working.

No Atlas scripts are working above - anyone have any ideas?


I discovered the problem. I had forgotten to add an "EnablePartialRendering"attribute to true on my ScriptManager.

The first page above had a pagewith just an UpdatePanel. The pageworked, but it posted back instead of updating through atlas. When I added an UpdateProgress, I got thefollowing two error messages:

"Assertion Failed:Could not resolve reference to object named "_pageRequestManager" for"dataContext" property on object of type "Sys.Binding"

"Assertion Failed:No data context available for binding with ID"" and dataPath"inPostBack" on object of type "Sys.Binding"

I couldn't find anyinformation on these error message, and I assumed there was some problem in theinstallation. When I included the "EnablePartialRendering"attribute it solved the problem. I'msure as the Atlas documentation expands, this issue will be covered morethoroughly.

Thaks to Scott Gu and Matt Gibbs for taking some time to respond to my questions about it.
It is possibly related with this problemhttp://forums.asp.net/thread/1243525.aspx

Monday, March 26, 2012

Updating atlas and toolkit

If you already have atlas installed and created a new application via the atlas template in visual studio and are using the atlas "controls" how do you do upgrades when new releases of atlas or the controls come out? Will the new setup files update your system (templates,controls and apps) or is there something else that you will have to do?

You'll just need to copy over the Atlas assemblies in your \bin directory, and potentially update the Atlas settings in the web.config file.

Hope this helps,

Scott

Updating MasterPage panel from content page

Hello,

I have created a shopping cart which users can add products to within an update panel in a content page. However in the masterpage there is a 'basket' that displays how many products are currently in the basket. I need to find a way of updating this basket whenever the updatepanel in the content page is reloaded. Is this possible.

Thanks,

Curt.

Yes, create a Public Property on your Master Page and set the baskek based on this value. The value can then be updated from your content page (you can get access to the Master Page via Page.Master).


Thank you for your reply.

Could you give me some more help on how to do this as I don't have much experience with Public Properties just yet?

Thanks.


Here's a sample Public Property with a type of String:

Public Property Name()As String Get Return _NameEnd Get Set(ByVal valueAs String) _Name = valueEnd Set End Property

Wednesday, March 21, 2012

Uregnt

I have created dinamically some HoverMenuExtender controls:

HoverMenuExtender hme =newHoverMenuExtender();hme.ID =Guid.NewGuid().ToString();

hme.TargetControlID = lblTarget.ID;

......

_tblCell.Controls.Add(hme);

....

, but some time on postback i receive

"Extender controls may not be registered after prerender".

I want to know how i can handle this !!

Thanks

Hi iuliax,

Would you please give us a simple repro? So we can troubleshoot it in your case.

Best regards,

Joanthan

Urgent Help Required

Hi All,

I am new to Atlas Technology. Just I started an application with Atlas but it is not working. I created web site using Asp.net Web site Template instead of using Atlas Web Site template. I refer Atlas dll in my application, then also it is not working, it shows an "Unknown Error" message. Can we use Atlas if the application opened in asp.net web site template. Or we must need to open it in Atlas web site template.

Can any one tell me what are all the requirements needed for Atlas based application, that is in Client and developing machine requirements. Whether we need JVM for running Atlas based application.

I just create a sample web application using Asp.net web site template. The page consist of two text box and two button. One button is "Add" and other button is "Back". If I press Add button it call server side btnadd_Click using Atlas. But it is not working. I am pasting my code here please tell me solution for this.

<atlas:ScriptManager id="scptMgr" runat="server" EnablePartialRendering="true" />

<asp:TextBox ID="txtAstClassName" runat="server"></asp:TextBox>
<asp:TextBox ID="txtAstClassPrefix" runat="server"></asp:TextBox>

<atlas:UpdatePanel Mode="Conditional" ID="atlasUpdate" runat="server">
<ContentTemplate></ContentTemplate>

<Triggers>
<atlas:ControlEventTrigger ControlID="btnAdd" EventName="Click" />
</Triggers>
</atlas:UpdatePanel>
<asp:Button ID="btnAdd" runat="server" Text="Add"

OnClientClick="AddUpdateAssetClass()" OnClick="btnAdd_Click" />
<asp:Button ID="btnBack" runat="server" Text="Back" />

I set web config like this

<

controls>
<

add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas" />
<

add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagPrefix="atlas" />
</

controls>

In this I call server side Add Click event in Atlas Trigger. But It shows error.

It is very urgent Please help me, Any sample program which is created using Asp.Net web template and Atlas pls send to me.

maximasshel@dotnet.itags.org.yahoo.com

maximasshel@dotnet.itags.org.hotmail.com

Regards,

Maximasshel

Hi,

if you are working with the ASP.NET WebSite template, be sure to reference the Atlas dll but also to update the web.config (the changes you made to your web.config are not enough).

The easiest way to update the web.config is copying it (or the relevant sections) from the Atlas WebSite template.

Hi

I refer dll in my application and I get this config information from other project which is created in Atlas Web Site template.

I just include add button event in atlas trigger, that shows error.

regards,

maximasshel