Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

Updating a ContentPlaceHolder with Ajax

I am working on a project which uses a MasterPage with one ContentPlaceHolder. I have a custom menu control on the MasterPage. When an item in the menu is clicked I need the ContentPlaceHolder to be updated with the requested content. I know this can easily be done using an iframe, but I'd rather stay away from iframes and like to do this with Ajax.

Basically my question is if this is possible at all. I've been trying a couple of things but without success and I think it may have to do by the way a MasterPage works.
If not possible, is there some kind of workaround for this? (without residing to iframes)

Thanks!

Hi Rino,

I tried also the same thing as you. I had a menu on my master page and an ContentPlaceHolder in my update panel. That didn't work. I think it isn't possible what you want to do.

Regards,


Unfortunately, no. It's just not how master pages and AJAX work. I just finished a post on the topic here:http://odetocode.com/Blogs/scott/archive/2007/01/03/9682.aspx


Thanks guys for clearing this up!
Would be great as a new .Net feature though :)


You can do it right now, actually, it's not that big of a deal. You don't really need a contentplaceholder for it, just a Div that you can hook into w/ javascript (giving it an ID, for example). You have your menu item click handler fire a javascript function that calls a web service and then have the onrequest complete handler fill the div with the stuff it gets back.

paul.vencill:

You don't really need a contentplaceholder for it, just a Div that you can hook into w/ javascript (giving it an ID, for example). You have your menu item click handler fire a javascript function that calls a web service and then have the onrequest complete handler fill the div with the stuff it gets back.

Paul: Yes, but this is an entirely different approach.


Understood. I was trying to offer something that might work for his application. is there a good reason you can think of to limit his app to using contentplaceholders?

No, my goal was just to point out that updating content place holders with content from a different page isn't how the technologies work together. It seems to be a common question these days, so I'm trying to clear that up.

The right way to achieve this would be to use a solution like you proposed!


ah, ok, cool. :D

It is very easy.

See my last post about "Handling events...".

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.

Saturday, March 24, 2012

Upgrade January project to March project

Can someone tell me how I can upgrade an existing January release project to the new March release project?

Thanks.

1. Remove the old ScriptLibrary folder from your app
2. Replace Microsoft.Web.Atlas.dll with the new DLL
3. Update your web.config based on the new web.config that comes with the March CTP

Thanks,

Eilon

Upgrade to Beta 1 = New Rating control error

I installed the latest framework and toolkit.

My project was working fine with a wizard control that contained rating controls. I've taken the rating controls out of the wizard template and put them in their own update panel and still receive the error. It's a very strange behavior. If I make a new page and do everything, the rating control works fine. I'm using the latest control and did all the changes required to use the new Beta. After the install, I keep receiving this error when loading the page:

System.InvalidOperationException was unhandled by user code
Message="The TargetControlID of '_RatingExtender' is not valid. The value cannot be null or empty."
Source="Microsoft.Web.Extensions"
StackTrace:
at Microsoft.Web.UI.ExtenderControl.RegisterWithScriptManager()
at Microsoft.Web.UI.ExtenderControl.OnInit(EventArgs e)
at AjaxControlToolkit.ExtenderControlBase.OnInit(EventArgs e) in C:\Program Files\Microsoft ASP.NET\AjaxControlToolkit\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 338
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at Microsoft.Web.UI.UpdatePanel.SingleChildControlCollection.AddSingleChild(Control child)
at Microsoft.Web.UI.UpdatePanel.AddContentTemplateContainer()
at Microsoft.Web.UI.UpdatePanel.CreateContents(Boolean recreate)
at Microsoft.Web.UI.UpdatePanel.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks

Anyone ? Can you please take a look? I believe others are experiencing something similar with the mentioned TargetControlID.

Thanks


When the project breaks, it breaks at the bold:

/// <summary>
/// On Init we load target properties values and process databinding handlers.
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
if (EnableClientState)
{
CreateClientStateField();
}
// EnsureProfileScriptService(ScriptManager.GetCurrent(Page), true);
Page.PreLoad += new EventHandler(Page_PreLoad);
base.OnInit(e);
}


Please reply with acomplete, self-contained sample page that demonstrates the problem. Thank you!

In my case the problem occures when I specify the rating control in the skin file.

Skinfile:

<

ajaxToolkit:Ratingrunat="server"StarCssClass="ratingStar"WaitingStarCssClass="savedRatingStar"FilledStarCssClass="filledRatingStar"EmptyStarCssClass="emptyRatingStar"/>
Good to know! Do you have a complete, self-contained sample we can play with?

Just add the following 2 lines in the Default.skin file of the Ajax Control Toolkit SampleWebSite:

<%@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %>
<ajaxToolkit:Ratingrunat="server"StarCssClass="ratingStar"WaitingStarCssClass="savedRatingStar"FilledStarCssClass="filledRatingStar"EmptyStarCssClass="emptyRatingStar"/>

Then try to open the Rating sample of the SampleWebSite.


The SampleWebSite doesn't have a Default.skin file - might there be something else going on here that's causing issues?

Upgrade woes

I've installed the latest AJAX 1.0 package, but when I try to compile my project I get:

Error 102 C:\Documents and Settings\Chris\My Documents\My Webs\Tasks\Default.aspx: ASP.NET runtime error: 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. C:\Documents and Settings\Chris\My Documents\My Webs\Tasks\Default.aspx 1 1 C:\...\Tasks\

I do a find in solution for 'Microsoft.Web.Extensions', and there are no results. What is trying to load this .dll?

Ok, if you have an older version and you upgraded, you need also to upgrade your web.config

This link will show you how:http://alpascual.com/blog/al/archive/2007/02/05/Manually-upgrading-any-project-to-ASP.NET-2.0-AJAX-1.0.aspx

Hope this helps

Upgrading ASP.NET 2.0 projects to Atlas

How do you upgrade an existing ASP.NET 2.0 project to Atlas? I already install the Atlas April 2006 CTP. I can create Atlas websites in VS 2005 but I want to upgrade some of the projects I have to Atlas.

hello.

well, you need to put the atlas dll on the bin folder, copy some entries from the default atlas web.config to your app's config and, if you're using bridges, add a new extension to iis.


bass_player...

Try these instructions on my blog -http://codebetter.com/blogs/jay.kimble/archive/2006/05/19/144952.aspx

I think they will help you out considerably.

Jay


bass_player...

Try these instructions on my blog -http://codebetter.com/blogs/jay.kimble/archive/2006/05/19/144952.aspx

I think they will help you out considerably.

Jay


Thanks a lot Jay, I really appreciate this. I just need to try it out. Will give you some updates.

upgrading to ajax.net from Atlas 2.0

Hi, after searching around a bit on this forum I'm not really finding info on how to upgrade to the latest ajax.net from an old Atlas 2.0 project I have.

I have a working project that is Atlas 2.0.5xxx... Is there special instructions on upgrading to ajax.net 1.0? or should I just download it and follow normal install instructions?

Thanks very much.

-JBD

Hi,JBD

Check this articlehttp://groups.google.mu/group/ajaxpro/msg/828724afed7d8132

Let me know if you need more info.

Thanks

NOTE:This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Wednesday, March 21, 2012

Usage of Atlas in commercial applications

Hello,

I am about to start a new project and I would like to use Atlas in it. So, I am deciding if it make sense to use Atlas (April CTP) in commercial applications. If somebody has experience / thoughts in such usage please "say" your impressions.

Thank you.

hello.

well, there's already a go live licence, though i think it ends during august or september...it still has one or two nasty bugs, but i think it's safe to start using it in real apps.


Luis Abreu:

hello.

well, there's already a go live licence, though i think it ends during august or september...it still has one or two nasty bugs, but i think it's safe to start using it in real apps.

Hello Luis,

Thank you for the answer, could you please provide more details about couple of nasty bugs you have mentioned?


hello.

hum...well, most of them are easilly fixed, if you can change the atlas.js file...just search for [BUG] in this forum and you'll find several entries that describe several problems found during the ctp (some were already fiexed in the latest release).