Showing posts with label version. Show all posts
Showing posts with label version. 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

Hello,
I was developing a produciton project using Atlas July CTP and Control Toolkit.
Now I'd like to updating to last version, but I can see that ATLAS is formed by 2 components:
Atlas 1.0 beta AND Atlas CTP beta.
I was used only Updatepanel in July CTP

What I need now? Is necessary to install both 1.0 and CTP?

And fot update what I do?
Must uninstall the previous version and then Install the new one?

tnx

If you just used the updatepanel, you don't need the CTP Beta, only the AJAX.net 1.0 beta. If you used the Atlas Control Toolkit, you'll need to reinstall that too. You'll also have to update your pages to work with new new edition of the framework, but with just updatepanels, it won't be that hard.
Can some direct me to installation instructions page......please.

For install instructions, go to:

http://ajax.asp.net/docs/Overview/installing/default.aspx

For changes between ctp and beta, go to:

http://ajax.asp.net/files/AspNet_AJAX_CTP_to_Beta_Whitepaper.aspx?tabid=47

For a feature matrix of what is in each install, go to:

http://ajax.asp.net and click on Feautre Matrix in tabbed panels.

Updating Atlas

I must update my Atlas version.
I was develop some projects with April CTP.
How I do now? Which is the correctly procedure?
I must install the new version that overwrite the previus one? or I must uninstall the previus release?
...and what about updating existing project?
is it automatic or I must manually update? (changing the dll in bin directory??)
thanx

Hi,

if you installed the previous version via the .msi installer, then you should uninstall the previous release.

Regarding your projects, you have to change the dll referenced in the bin directory.

Updating control toolkit

I have some projects with some control from Atlas control toolkit (previous version).
Now there's the new version!
Is not easy to know what i do for update the previous with the new one.
Only change the dll?
It is sure that the old project will work? ...or I must to modify some code?
And what about .net controls tool list?
thanks

Just make sure that your project references the new dll. For the toolbox, delete all the controls from your toolkit tab and then readd them all. As for breaking changes, I've not heard about any, but I've not looked hard for a list of changes / breaking code.

Saturday, March 24, 2012

Upgrade issue - RC to full release

Hi All -

I upgraded from the RC of ASP.Net AJAX Extensions to the 1.0 full release versin.

I started by uninstalling the RC version, uninstalling the ASP.NET AJAX December Futures CTP and (here is where I probably made my mistake) removing the toolbox tabs for AJAX Extensions and the AJAX Control Toolkit.

After installing the release version of ASP.Net AJAX Extensions 1.0 and the ASP.NET AJAX January CTP I did not get the toolbox items back (for the standard items - ScriptManager - UpdatePanel - etc.). I did not even get a AJAX Extensions tab in the toolbox. I have tried running the install again and doing a repair, I tried looking for a dll to refereence when "chossing items" to add to a new tab. Nothing seems to work.

Please help

Thanks

Try adding them back manually from Tools menu, Choose Toolbox Items, Browser to Ajax/AjaxToolkit folder select .dll and select controls.


Try adding them back manually from Tools menu, Choose Toolbox Items, Browser to Ajax/AjaxToolkit folder select .dll and select controls.

Alos

Try adding them back manually from Tools menu, Choose Toolbox Items, Browser to Ajax/AjaxToolkit folder select .dll and select controls.

Also

Try adding them back manually from Tools menu, Choose Toolbox Items, Browser to Ajax/AjaxToolkit folder select .dll and select controls.

Also follow

Thanks Nilesh -

I get the same interface as I do when right clicking on the tab - I select the AJAXExtensionsToolBox.dll and an error message pops up - "There are no components in AJAXExtensionsToolBox.dll that can be placed on the toolbox".

This is not the AJAX Toolkit I am tryng to recover the toolbox items for - it is the basic AJAX tools...

NileshDesh:

Try adding them back manually from Tools menu, Choose Toolbox Items, Browser to Ajax/AjaxToolkit folder select .dll and select controls.

Also follow

upgrade to the new release of control toolkit provides versioning trouble

Hi,

I just copied and pasted the new dll of the control toolkit over the old ones. Then i changed the app.config to reflect the new version number :

<addtagPrefix="ajaxToolkit"namespace="AjaxControlToolkit"assembly="AjaxControlToolkit, Version=1.0.10606.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>

I also removed all the icons from the toolbox and added them in again.

when i drag an item from the toolbox onto my form, it gives it the tag prefix of cc1 instead of ajaxToolkit.

like

<cc1:TabPanelID="TabPanel1"runat="server">

</cc1:TabPanel>

What is it that i am missing?

Thanks!

It is perfectly normal.

Refer to the following post for more details

http://forums.asp.net/p/1117736/1736819.aspx#1736819


Thanks for the reply and the link. According to the book that you link to, the developers need to add[assembly:TagPrefix("AjaxControlToolkit ", " ajaxToolkit ")] to theAssemblyInfo.cs file for this problem to go away.


First of all, it is not a problem. You don't need to worry about the tag prefix used by the controls.

The tag prefix is decided by the developer of the control. He makes the entry into the AssemblyInfo.cs of the control.

Upgraded to RC but the Bug lurks

Hi,

I have upgraded to AJAX RC version from AJAX Beta 2...... I have a Page that has a MasterPage and I'm building an HtmlTable at runtime and Add to an already existing Panel in this Page. This Panel is in an UpdatePanel.. It doesn't simply does a full postback and not an asyncronous one...

This seeems to be something related to a MasterPage since when done without a MasterPage it just works fine

please shed a bit of light on this... this is a bug that lurked from Beta 1.. anyone knows why...?

Thanks !

so no one knows or happened to come across it?

please!


Can you provide the source code. If there is no javascript error on page, I believe it might be something to do with the web.config. Make sure that legacy rendering is OFF in web.config.

vineetc


source code?

Panel1 is inside an UpdatePanel with a MasterPage.

Panel1.Controls.Clear();
Panel1.Controls.Add(new Template_cls().BuildTemplate(3, 3, 2));

BuildTemplate method returns an HtmlTable and adds it to Panel1.

...... the same code applied to a page without a MasterPage works fine.

In the web.config I have no legacy rendering .. doesn't exist. The Web.Config is updated with the latest release of the RC version.

Thanks!


I don't know why no-one wants to answer... possible that no-one uses MasterPages with UpdatePanels and creating controls at runtime?!....there's a bug

hmm... actually that works fine yes...maybe I didn't describe myself correctly

What you said is part of it and works fine. I'm adding a GridView control at runtime. The GridView has the "Select" commands. When I click the "Select" command it does a full postback to the server even though its under the UpdatePanel!


Thanks and sorry for not describing myself correctly.


I tried something like this and everything worked fine.

<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="panel1" runat="server">
<asp:Button ID="Button2" runat="server"Text="Button" OnClick="Button2_Click"></asp:Button>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:ContentPlaceHolder>
</div>
</form>

On Button2_Click, I add a control inside the panel.

protected void Button2_Click(object sender, EventArgs e)
{
Label lb = new Label();
lb.Text = "label";
this.panel1.Controls.Add(lb);
}

You need to verify that legacy rendering is OFF in your web.config. You might have to move up the hierarchy of your website and see if there are any web.configs where it might be on.

vineetc


So basically it makes a full postback when a GridView with "select" commands is added to an HtmlTable which in turn is added to a Panel that is under an UpdatePanel AND also when the Page has a MasterPage. It makes a full postback when you click on the GridView "select" command button. Both HtmlTable and GridView are added at runtime.

This is a very specific error, I'm sure its a bug so please check it out!!. It works well without MasterPages. I don't know whats with the GridView "Select" commands when under a UpdatePanel pertaining to a page has a MasterPage.

Thanks!!

Upgrading Ajax Control Toolkit

Is there a faq on how to upgrade an existing app to a newer version of the control toolkit? What needs to be done etc?

Replace the old toolkit dll reference in your project(s) to the dll from the current release.


Seethis forum post for more details.

Upgrading from Beta 2 to 1.0 in production server

Hi there! I'm going to upgrade MS Ajax as subject. I read somewhere else I should restart IIS to make it use the new version. How can I do it without restarting the server? Any other things I should have in mind while performing the upgrade?

Thanks,

-Benton

Hi benton,

Restart IIS --> Open --> run --> iisrestart

Regards,

Upgrading the AJAX Control Toolkit?

If I have a directory called AJAXCTPEnabledWebsite1 in my VS websites folder, how do I upgrade that to the release version? I guess I'm not sure what the difference is between AJAX 1.0 and the AJAX Control Toolkit. If I have the AJAX Control Toolkit, does that mean I already have AJAX (pre 1.0 in my case) installed?

I just need to get upgraded to the release version(s) and need a little direction. Any help will be greatly appreciated. Which of these do I need:

http://ajax.asp.net/downloads/default.aspx?tabid=47

You needboth, the RTM version of ASP.Net AJAX and the latest version of the toolkit. You will need to recompile your project against the latest bits and check for any issues. You can find toolkit breaking changes information under thearchived releases section of the toolkit and ASP.Net AJAX breaking changeshere.

The latest version is v1.0.10301.0. Download that release (its the latest one), get the zip files that includes all the files. In the Sample Websites/Bin you will see "AjaxControlToolkit.dll". Thats the dll you need to import in to your VS Toolkit.


kirtid:

You needboth, the RTM version of ASP.Net AJAX and the latest version of the toolkit. You will need to recompile your project against the latest bits and check for any issues. You can find toolkit breaking changes information under thearchived releases section of the toolkit and ASP.Net AJAX breaking changeshere.

So is the 'beta' of the control toolkit the ASP.NET AJAX RC or the ATLAS version? I found the migration docs, but they are different based on which version you have. As I said, I have the 'beta', but I'm not sure if that is the same as the AJAC RC or the ATLAS version. I believe it should be the AJAX RC, but I want to confirm before I start uninstalling/installing. In the link below, it mentions 'beta' in the sentance above two possible documents, but the links and info about the actual links don't label either one as migration from the 'beta'.

Specifically, on this page, do I use the first or second migration document if I have the Control Toolkit 'beta'?: http://ajax.asp.net/documentation/default.aspx?tabid=47

Thanks for the info.


The toolkit is built on top of the ASP.Net AJAX platform. They are two separate entities. ASP.Net AJAX RTM is what the latest version of the toolkit uses. You should always use the latest version of the toolkit which is what we support. I pointed you to the archived releases in case you wanted to check out any older breaking changes. You should uninstall all older versions of ASP.Net AJAX before installing the RTM build, then download the latest version of the toolkit and compile your project against these new dlls.


Ahh, OK, now I see, that makes sense. Thanks!

Wednesday, March 21, 2012

Urgent - Trying to make Localization work (RC version)

I am going crazy with localization. It doesn't work :(

I have 2 projects: a web application (ajax enabled) and a class library with a server control.

I have this in my server control:

[assembly:

WebResource("SomeControl.myScript.js","text/javascript")]

[assembly:

ScriptResource("SomeControl.myScript.js","SomeControl.Res","SomeControl.Res")]

The myScript.js file is marked as embedded resource.

I have SomeControl.res and SomeControl.pt-BR.res resource files.

I have EnableScriptLocalization="true" in my ScriptManager.

I am registering myScript.js in the OnInit phase of the server control, like this:

// get script manager

ScriptManager scrMgr =ScriptManager.GetCurrent(this.Page);// register javascript fileScriptReference scriptRef =newScriptReference(

Page.ClientScript.GetWebResourceUrl(

this.GetType(),"SomeControl.myScript.js"));

scriptRef.NotifyScriptLoaded =

true;

scriptRef.ScriptMode =

ScriptMode.Auto;

scrMgr.Scripts.Add(scriptRef);

--

The problem is that the client side resource object is not being generated!!!

When I run the page and look with Fiddler, I have only the contents of myScript.js,but not the contents of the resources that I need.

I should have the contents of the resource files ready to be used client side.

I really need this feature and I am speding hours with this without success... I'd like to know if anyone here could make it work, and if possible, give me a help.

Thanks!

I found the problem :)

I must register myScript.js like this:

// get script manager

ScriptManager scrMgr =ScriptManager.GetCurrent(this.Page);// register javascript fileScriptReference scriptRef =newScriptReference("SomeControl.myScript.js","SomeControl");

scriptRef.ResourceUICultures =

newstring[] {"pt-BR" };

scriptRef.NotifyScriptLoaded =

true;

scriptRef.ScriptMode =

ScriptMode.Auto;

scrMgr.Scripts.Add(scriptRef);

Now it works...

Cheers!