Some Atlas Samples

Atlas samples from a recent conference...

Last week, I gave an Atlas talk at the TechReady conference - a Microsoft conference for field, sales and other groups within Microsoft. As mentioned during the talk, I've put the samples online for folks to download and check out. Specifically, the samples run against the December CTP bits, and cover both server-centric and client-centric development models. The samples themselves are fairly basic, but hopefully that keeps them minimal, so you can focus on the atlas bits.

For the server-centric model, I demonstrated taking a simple master/details page containing FormView, DataList, and ObjectDataSource, and adding post-back-less refreshes, auto-complete, and drag/droppable UI... via UpdatePanel, ScriptManager and extender controls.

For the client-centric model, I demonstrated script proxy generation, calling Web service methods, using ItemView to display Web service results imperatively. Finally I showed how to do the same using declarative XML script (and how that hides away the async nature of Web service access).


[ Tags: | | | | ]
Posted on Monday, 1/16/2006 @ 10:47 PM | #ASP.NET


Comments

30 comments have been posted.

Nikhil Kothari

Posted on 1/16/2006 @ 10:52 PM
Just realized couple little bits of info, as soon as posted...
- You may need to update the connection string used for the profile service if you don't have a local SQL server named aspnetdb.
- You will need you personal key to access weather.com (the sample uses weather.com's web service) if you want to run the samples. The code contains a comment pointing you at the URL you need to visit.
- I didn't include atlas bits in the download themselves. You can get those at http://atlas.asp.net.

Pierre Lagarde

Posted on 1/17/2006 @ 12:02 AM
Thanks Nikhil it's a very nice demo !

Javier G. Lozano

Posted on 1/17/2006 @ 4:19 AM
Thanks for the examples, Nikhil!

Andrey Skvortsov

Posted on 1/17/2006 @ 5:15 AM
Thanks,very useful staff-clear and simple,but how about latest Vista(5270) it seems "native" XMLHttpRequest dosen't work at all in IE:-(
Please,look at http://forums.asp.net/1008/ShowForum.aspx if you can and leave some comment on topic-is it proper behavior if I write "new XMLHttpRequest()" and IE says- "Not implemented",window.XMLHttpRequest(check in iecompatible script,by the way)-same here,IE says "Not implemented" on any attempt to use XMLHttpRequest.

sam

Posted on 1/17/2006 @ 11:11 AM
Can anyone put here some valid : city or zip code to test the samples ?
I am from europe :P

Nikhil Kothari

Posted on 1/17/2006 @ 12:20 PM
In the App_Code directory, there is a CityProvider class that contains a set of city names, and corresponding zip codes.
You could test Redmond, 98052... oh wait, you don't need weather.com for this place... its raining, and its going to rain more! :-)

Steve

Posted on 1/17/2006 @ 8:51 PM
I was able to programmatically use the drag in drop from atlas on my game website: http://www.forgottenskies.com/ForgottenWars/FSWarMap.aspx

I like the new stuff - thanks Nikhil

ronita

Posted on 1/19/2006 @ 2:23 AM
Hi Nikhil,

AutoCompleteExtender doesnt seem to work within a .ascx(user control) form.
Please suggest a workaround or where i am going wrong.

thanks,
ron

krish

Posted on 1/23/2006 @ 6:45 AM
Hi Nikhil,

I attended your talk at TechReady2 and I was going through the samples you posted (thanks for that), and remember seeing this demo of an aspx page that was several pages long with [all] the Altas bits commented out. And you then ran through the demo selectively commenting out one bit after the other.

Do you happen to have that aspx page? I was browsing the code in the posted samples, but did not find it.

Thanks,

-krish

Wallym

Posted on 1/25/2006 @ 8:29 AM
Nikhil,

What does the database structure need to look like? Or, do I just need to setup the database for profiles?

Wally

Jayesh

Posted on 1/27/2006 @ 1:53 AM
Dear Nikhil,

I am trying to learn Atalas implementation... but i am little confused with its usage. Most of samples use Web service as base... is web service must to implement Atalas? Can i use Atlas to handle my post back issues with Atlas in my simple Web application? Where shall i find such samples where atalas is being used with simple web application ( e.g. Using Ado.Net, Data Binding with Data Grid and Data Lists, Multiple interdependent dropdowns which takes value from database dynamically etc..)

Thanks in advance

Nikhil Kothari

Posted on 1/27/2006 @ 6:27 PM
Wally, the db structure is a regular asp.net db that you can configure using aspnet_regsql.

Jayesh, you can use ScriptManager + UpdatePanel to implement your scenario today (look at http://www.nikhilk.net/AtlasM1.aspx). We'll probably have much better support for cascading dropdownlists in the future out-of-the-box.

Krish, I don't have that aspx page handy, but in general look for the server controls with the "atlas" prefix. Those are the atlas additions to the existing page to enrich its behavior.

Alan

Posted on 1/30/2006 @ 7:08 AM
I tried out the example. It works great for IE. However, the auto-complete and drag'ndrop feature don't work at all for Safari. Do we have any plan to address this issue or just leave it as is.

Thank you for the excellent illustration on MS Atlas.

zhouxingchi

Posted on 1/30/2006 @ 9:18 AM
Hi, does the sample require some sql script to run?

Alan

Posted on 1/30/2006 @ 1:24 PM
zhouxingchi, no sql script is needed to run the example. You only need to set up aspnetdb for the profile management.

Alan

Nikhil Kothari

Posted on 1/30/2006 @ 10:42 PM
The goal is to support multiple browsers... things like autocomplete and drag/drop ought to work in Safari. Thanks for pointing it out... we'll look at these for our next release.

Peter

Posted on 2/1/2006 @ 2:56 AM
Ronita, AutoCompleteExtenders do work in UserControls; it could be that you're incorrectly setting the atlas:ServiceReference Path and/or AutoCompleteExtender ServicePath relative to the location of the .aspx file where you're including the UserControl instead of relative to the location of the .ascx file itself.


Nikhil, what does the javascript error stating "delta has no properties" in line 7684 in the ScriptLibrary/Debug/Atlas.js mean? Specifically I'm getting this error when I try to Post an .aspx form that utilises AutoCompleteExtenders to populate a couple of TextBoxes.

By the way Nikhil, keep up the good work. I spent several months bashing out my own custom AJAX code before I found Atlas so I really appreciate all the hard work you and your colleagues are doing to make this all so beautifully simple and easy for the rest of us. Fantastic! I'm dying to use 1.0. Great stuff.

Nikhil Kothari

Posted on 2/1/2006 @ 12:23 PM
Peter, we will have better error handling support around those async postbacks in the next public release. For now the best way to see whats going on is to snoop around and spy on the HTTP requests/responses happening. You can do so via my Web Development Helper tool, or via another HTTP tracing tool.

Thanks by the way for identifying a possible issue around the usercontrol + autocomplete scenario. In general, you can use application relative paths (eg. ~/MyServices/Foo.asmx) for the service reference, and script reference objects. This way you don't need to worry too much about getting relative paths straight, and simply let ASP.NET do it for you.

rachel

Posted on 2/1/2006 @ 11:08 PM
Cool! Just stumbled across this blog - looks very much like something I’d been planning on trying. Will be checking in regularly...

Peter

Posted on 2/10/2006 @ 10:33 PM
Just a followup regarding the issues I had with trying to Post an .aspx form that utilises AutoCompleteExtenders, the problem disappeared after I installed the January release.

eggcaker

Posted on 2/15/2006 @ 12:41 AM
so cool.

ABHISHEK RUSTOGI

Posted on 2/15/2006 @ 8:45 PM
HI Nikhil,
I am facing a problem. I want to show a Pop-Up window on the click of a HTML button. But i dont know how to open a new window on the click of the button. Using the behavios i am able to open a ballon , but not a new window. So please tell me how can I do so, As it is kind of reqiurement from the client. So please guide me urgently.

Pavan

Posted on 2/19/2006 @ 5:26 PM
This is real, good stuff!

Questions:
Is there a book to follow on this topic? Or any other literature that takes a beginner through step after step?

dinesh

Posted on 2/20/2006 @ 2:23 AM
please tell me the minimum requirement to run the samples. i have visual web develpoer and the atlas vsi installed. but having problem in runing your samples. having some build errors due to unrecognised tags.please give the solution...

suza

Posted on 2/27/2006 @ 4:05 AM
Dear programmer,

You have an bug

In situation:

asp:panel1 (visible = true)
updatepanel1
updatepanel2
panel1


asp:panel2 (visible=false)
updatepanel3
updatepanel4
panel2


In atlas.js, error in line 7707:

-j=3..0
-document.GetElementById(_updatepanelIds[3] => null and error situation
-document.GetElementById(_updatepanelIds[2] => null and error situation
-document.GetElementById(_updatepanelIds[1] => updatepanel2
-document.GetElementById(_updatepanelIds[0] => updatepanel1

In older version of atlas this is correct.

Please correct atlas.js and send me new library.

suzab@Eunet.yu

Inventisity

Posted on 3/2/2006 @ 6:19 AM
Hi Nikhil,

what is the correct technique to embed the VirtualEarthMap control into the page now since atlas:VirtualEarthMap was removed in the January release.

Thanks :)

Ahmed Adly

Posted on 3/18/2006 @ 10:07 AM
hi all
i tried to download the samples file above but the link didn't work,
kindly please can anybody provide another link for these samples ?

regards

Andrew

Posted on 4/12/2006 @ 10:33 AM
I tried the Atlas example with the latest April release and it seems to crash Firefox while dragging the weather box around and doesn't work at all in Opera.

michel

Posted on 7/3/2006 @ 7:59 AM
Dear Nikhil,

I'm starting to move a project from ASP.NET into ATLAS and I wanted to get your point of view about the following problem I meet;
The code below is generating dynamically a MultiView; If I'm running the code below without using a <atlas:UpdatePanel>, it creates without problem my MultiView1 object;

But if I put my multiview into an <atlas:UpdatePanel> I get an error message in the method Page_PreInit() informing me that my object MultiView1 is null.
Without the <altas:UpdatePanel> it is running.

Here is a part the code of my aspx file:

<atlas:UpdatePanel ID="UpdatePanel2" runat="server" Mode="Conditional">
<ContentTemplate>
<table style="width:100%">
<tr style="width:100%">
<td style="width:100%">
<asp:MultiView ID="MultiView1" runat="server" Visible="true" >
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
</atlas:UpdatePanel>

And here is the C# code for generating dynamically Views and adding them into the MultiView control:

for (int i=0; i<Max; i++)
{
View view = new View();

...
// creation of a set of controls which will be attached to the view (for example: view.Controls.Add(myLabel), view.Controls.Add(myTextBox), ...)
...

// inserting the view to the my MutliView1 instance of Multiview
MultiView1.Views.Add(view);

}

I tried to find unsuccessfull an article on internet using the same phylosophy;

Could you please just tell me if there is a way to create dynamically a multiview having views created dynamically too? And of course everything must be in an update control?

Thanks

Best regards

Michel

Nikhil Kothari

Posted on 7/3/2006 @ 11:10 AM
Michel - if you're to access MultiView in PreInit its too early in the lifecycle... try at Init or Load time.
Also, the comment form isn't the best way to get support (esp. in some old post). I'd recommend you head over to the forums on asp.net for support.
The discussion on this post has been closed. Please use my contact form to provide comments.