Showing posts with label upgraded. Show all posts
Showing posts with label upgraded. Show all posts

Wednesday, March 28, 2012

UpdateProgress.FindControl() does not work in beta 2

We have upgraded to beta 2 and the following code (which worked under beta 1) does not work.

The FindControl() method is returning null and the UpdateProgress.Controls.Count property is showing as 0.

Is this a problem in beta 2? Can anyone help with a solution?

<asp:UpdateProgressID="atlasProgress"runat="server">

<ProgressTemplate><asp:LabelID="messageLabel"runat="server"Text="Original Message"></asp:Label></ProgressTemplate></asp:UpdateProgress>

Label updateLabel = (Label)this.atlasProgress.FindControl("messageLabel");if (!(updateLabel ==null))

{

updateLabel.Text = "New Message";

}

I tested your codes and found the same problems as yours.asp:UpdateProgress.FindControl can not work in Ajax Beta 2.Maybe this is caused by Ajax Beta 2 framework.

Here are some explanations from ASP.NET Team for your reference.

Summary:

Due to a known issue with ASP.NET AJAX Beta 1, you may find that Extender controls no longer work with templated controls such as GridView or FormView. This issue will be addressed in the next release of ASP.NET AJAX.

Background:

The ScriptManager component on your ASPX page is responsible for rendering out the client script (JavaScript) that creates the client side components. The ScriptManager walks the list of components that need these hookups during it's PreRender phase of the page lifecycle. Unfortunately, templated controls often create their inner control heirarchies during PreRender as well. Therefore, since the ScriptManager appears earlier in the page than the templated control, the extenders have not been created yet, and the hookups don't happen.

Workaround:

Fortuantely, for the common case, there is a simple workaround. You simply need to force control generation earlier in the page lifecycle. The simplest way to do this is to call DataBind method or Controls property from the Page_Load.

protected void Page_Load(object sender, EventArgs e)

{

GridView1.DataBind(); // for databound controls

object o = Login1.Controls; // for templated controls

}

Caveat:

This doesn't work for templated controls that make changes to their tree, such as a GridView with an EditItemTemplate in it. If you have that scenario, unfortunately, you'll need to wait for the next release of ASP.NET AJAX Beta 1 to enable it.

Wish the above can help you.


Hi I'm having the same problem with the AjaxControlToolkit

Dim temp_lkExportedCSV As HyperLink = CType(UpdateProgress1.FindControl("lkExportedCSV"), HyperLink)
Dim temp_lblPercent As Label = CType(UpdateProgress1.FindControl("lblPercent"), Label)
Dim temp_lblStatus As Label = CType(UpdateProgress1.FindControl("lblStatus"), Label)

temp_lkExportedCSV.Enabled = False | And here I get an exception, because no control was found.


And I called the Controls method in the page load just like it was explained bu tit still didn't work.

Dim o As Object = Me.UpdateProgress1.Controls

Am I doing something wrong?


Maybe it's the nature of the UpdateProgress that's looks invisible until the associated UpdatePanel is updating.


This is a known issue with the UpdateProgress control. It gets added very late in the page's lifecycle. Move your code to the Page_PreRenderComplete event or Page_Unload event. Page_Load is too early.

Saturday, March 24, 2012

Upgrade error: Could not load file or assembly Microsoft.Web.Extensions, Version=1.0.61025

I have upgraded from Beta 2 to RC1 and followed all of the upgrade instructions, but I'm still getting this error:

Error 26 Could not load file or assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I'm aware that Microsoft.Web.Extensions is now System.Web.Extensions, but I can't find where the old reference is!!!

I have searched all the files in my project for "Microsoft.Web.Extensions" as well as the machine.config. I'm currently searching every file on my hard drive for this reference and still can't find it.

Any ideas?

Thanks,

Still looking for some help...
Do you have the ControlToolkit on your site? We had that error before we updated to the newest toolkit.

I've found you have to move the DLL files form the .NET version folder on the hard drive to the bin folder in the site otherwise they need to be in the GAC.

I'm finding other problems with it. Like [no relevant source code lines] gotta be permissions or something.

Still looking...


I have the same problem and finally found out that the reference to Microsoft.Web.Extensions is in my web.config.

Have to go through and changes all "Microsoft.Web" to "System.Web" (mainly under the<pages><controls> tag).

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 issue - Please Help

Hi All -

I still have not resolved this issue from a previous post - any help appreciated.

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.

This is *NOT* the ASP.Net Ajax Toolkit that I am refering to - but the main ASP.NET Framework install and the main tools like ScriptManager and UpdatePanel.

Thanks...

To get the main controls into your toolbox, and into a tab, you need to first right-click inside a blank area of your toolbox and choose 'Add Tab', which you can then rename. Next, make sure that tab is extended/open, then right click in a blank area under the tab and click 'choose items'. Under the .NET Framework Components tab, click on the 'Assembly Name' column heading to sort by assembly names. Scroll down to the first entry for the "System.Web.Extensions" assembly, then place a checkmark next to each control from that assembly. Select 'OK' and you should be all set.

If you don't see them in the component box, try doing the above in a project that currently has System.Web.Extensions as a reference.


I am not finding System.Web.Extensions which is weird because I can still actually add the controls to a page by clicking the source tab and then just putting the HTML tags in like <asp:ScriptManager></asp:ScriptManager> .This works but no matter what I do I cannot get the items into the toolbox.

ps2goat:

To get the main controls into your toolbox, and into a tab, you need to first right-click inside a blank area of your toolbox and choose 'Add Tab', which you can then rename. Next, make sure that tab is extended/open, then right click in a blank area under the tab and click 'choose items'. Under the .NET Framework Components tab, click on the 'Assembly Name' column heading to sort by assembly names. Scroll down to the first entry for the "System.Web.Extensions" assembly, then place a checkmark next to each control from that assembly. Select 'OK' and you should be all set.

If you don't see them in the component box, try doing the above in a project that currently has System.Web.Extensions as a reference.


James Evans:

I am not finding System.Web.Extensions which is weird because I can still actually add the controls to a page by clicking the source tab and then just putting the HTML tags in like <asp:ScriptManager></asp:ScriptManager> .This works but no matter what I do I cannot get the items into the toolbox.

Check your global assembly cache to make sure anything with Microsoft.web has been uninstalled. (you may need to uninstall January CTP for this... reinstall it later). Windows directory/assembly/. (In my case, after installing service pack 1, the older versions of AJAX were no longer displayed in the control panel for removal).

To add the System.Web.Extensions dll to a project, you'll need to navigate to where the dll was installed. by default, this is %Program files%\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\. (You may see remnants from Microsoft.Web dlls in here, too).

You should then be able to add the controls to the toolbox as described in the previous post.

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!!

upgraded to new March ctp, having 2 menu creates js error?

Hi I just upgraded to march ctp...

1. Are there any scripts? I saw in another topic post talk about copying the new scripts, but I thought its all in the dll now, http module to provide the javascript right? there are no .js files right?

2. I have 2 menus.. i am getting this error often (not always) upon moving my mouse off the menu/tab:

A Runtime Error has occurred.
Do you wish to Debug?

Line 220
Error: '0.cells' is null or not an object

I think it has something to do with the "Menu_Unhover" function for the menus, but I am not sure

First menu is in masterpage, second menu is tabbed and on a page that uses the ScriptManager and UpdatePanel

bump - this has been mentioned a few times.

It generates that error with a menu in a updatepanel.

If anyone knows how to fix the javascript to prevent this error as a workaround let me know.


I have not thoroughly tested, but I did this:

protected void Page_Load(object sender, EventArgs e)
{
//ScriptManager1.RegisterAsyncPostBackControl(ResumeWizardTabbedMenu);
ScriptManager1.RegisterControl(ResumeWizardTabbedMenu);
}

The idea came from this post:

http://forums.asp.net/1223652/ShowPost.aspx
ScriptManager1.RegisterAsyncPostbackControl(Menu1);

-chau


Hi everyone,

The Menu hover issue will be fixed in the April CTP of Atlas (soon to be released!).

Thanks,

Eilon

Upgraded to March CTP and now takes forever to load .XML files from the browser!

Upgraded to March CTP and now takes forever to load .XML files from the browser! Not sure if any relation; my best guess is something to do with the new HttpHandlers/HttpModules?

I even changed my .xml files to .xml.js file with the same problem...

for quick fix, i did this, but need advice on what to do and what is happenning. basically i load xml file server to populate a dropdownlist...

<httpHandlers>

<removeverb="*"path="*.asmx"/>

<addverb="*"path="*.asmx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

<!--

The MultiRequestHandler enables multiple requests to be handled in one

roundtrip to the server. Its use requires Full Trust.

-->

<!--add verb="*" path="atlasbatchcall.axd" type="Microsoft.Web.Services.MultiRequestHandler" validate="false"/-->

<addverb="*"path="atlasglob.axd"type="Microsoft.Web.Globalization.GlobalizationHandler"validate="false"/>

<addverb="*"path="*.asbx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

</httpHandlers>

<httpModules>

<addname="ScriptModule"type="Microsoft.Web.Services.ScriptModule"/>

<!--add name="BridgeModule" type="Microsoft.Web.Services.BridgeModule"/>

<add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/-->

</httpModules>

Upgraded to AJAX Beta 2 - Now getting IE error Operation Aborted

...and page fails to load. If you refresh all is ok.

All I have used is Autoextender and updatepanel on the page with a master page.

Any ideas what this bug is and how to fix it?

MasterPage/ContentPage Scenarios
You may have a ScriptManager on your master page, but you may want to add additional script or service references in your content page. However, you can only have one ScriptManager on your page. Therefore we have the accompanying ScriptManagerProxy control.
<asp:Content ...>
<atlas:ScriptManagerProxy runat="server" id="scriptManagerProxy">
...
</atlas:ScriptManagerProxy>
</asp:Content

hello.

difficult to say what's happening without getting more info about the error...


I also upgraded to Beta 2 and now getting this error : but it is intermitant and really dont know what bit of code is doing it.

www.destinationrussia.com

Any ideas?


Hi,

I installed Ajax Beta 2 and future CTP Novemner in my PC.I could accesswww.destinationrussia.com through IE 7.0,FireFox and Opera and found the web page was loaded correctly for the first time.There are no any browser errors happened.Can you post some error message here?


Jasson_King:

Hi,

I installed Ajax Beta 2 and future CTP Novemner in my PC.I could accesswww.destinationrussia.com through IE 7.0,FireFox and Opera and found the web page was loaded correctly for the first time.There are no any browser errors happened.Can you post some error message here?

its a very intermittant error... i am driving myself crazy dealing with it to, as i cannot replicate it on demand

Luis Abreu:

hello.

difficult to say what's happening without getting more info about the error...

Want more info?
http://forums.asp.net/thread/1471506.aspx
http://weblogs.asp.net/infinitiesloop/archive/2006/11/02/Dealing-with-IE-_2600_quot_3B00_Operation-Aborted_2600_quot_3B002E00_-Or_2C00_-how-to-Crash-IE.aspx
http://www.ryangrant.net/archives/internet-explorer-cannot-open-the-internet-site-operation-aborted-google-map-api/

This error is indeed a tough one to track down

upgrading to Atlas 2.0

I upgraded a site to Atlas 2.0.
I now have a problem with an autoextender inside of a user control. In the user control, I am setting one of 6 textboxes visible depending upon the choice made in a dropdown list. Each textbox has an autoextender attatched to it. When the user starts typing, each autoextender calls it's own function in a web service and autofills the textbox.

This worked using 1.0 of Atlas with no errors

Now, When I browse to the page with the user control, I get the following error:
Assertion Failed: Could not find an HTML element with ID "CtlSearchLims1_txtStrain" for contorl of type "Sys.UI.Control" Break into Debugger?
Whether I click OK or cancel, nothing happens.

The ID of the Control is "CtlSearchLims1" and the first textbox on the control is txtStrain.
Every time I generate a postback I get the above mentioned message. For some reason, it is putting the control ID and the textbox ID together.

When I downloaded Atlas 2.0, I blew away the 1.0 download, so I either need to get this fixed or get a copy of the 1.0 download and go back to that version.

Thanks,

Faronwhere did you get atlas 2.0? since thereisn't even a 1.0 version. Atlas is still in beta and has a versionnumber like 0.0.0.0.0..0.0.0.0.1.2 or so.
So what do you mean? You upgraded from the March CTP to the April CTP?Or do you mean dat you upgraded from ASP.NET1.0 to ASP.NET 2.0?

I went from the previous version that has a Microsoft.Web.Atlas.dll in the bin folder of 167 kb (2/3/2006), to the latest version that has a Microsoft.Web.Atlas.dll of 1872 kb (4/6/2006).

I received no errors on the first version and it started failing when I moved to the current download of Atlas.

Faron


I went from the previous version (OF ATLAS) that has a Microsoft.Web.Atlas.dll in the bin folder of 167 kb (2/3/2006), to the latest version that has a Microsoft.Web.Atlas.dll of 1872 kb (4/6/2006).

Everything is on ASP.NET 2.0!

I received no errors on the first version and it started failing when I moved to the current download of Atlas.

Faron