Quick tour of December Atlas CTP

This post outlines the focus of the December '05 release of Atlas CTP bits, and walks through the key integration points with ASP.NET server controls to enable incremental enrichment of ASP.NET server-centric applications with scenarios such as incremental page refreshes, auto-complete, draggable panels etc.

We're releasing a new Atlas build today (the bits are ready; hopefully the last minute stuff to get them online goes through smoothly). This build factors in a lot of the early feedback, focus on scenarios, some real integration with ASP.NET server controls, as well as more of the exploration into the world of script which was the focus of our PDC release.

Earlier I blogged about the overall Atlas architecture, XML script (a new declarative XML-based script ala XAML), and a rich Web application programming model. Check them out if you haven't had a chance to read them, as the concepts continue to move forward, and provide a foundation that remains intact. What is new is the renewed focus on enabling incremental enrichment of ASP.NET server-control based applications. Yes, we listened to a lot of the early feedback. In this post, I'll give a high level overview and quick tour of what to look for (ok it turned out to be longer than I expected, but hopefully a fun read regardless). I am looking forward to seeing a new round of comments, and follow-up questions/discussion as people get a chance to play with the bits.

You may wonder what about all those atlas server controls we had in our PDC release. Wasn't that our integration with ASP.NET pages? Well, in short, they're gone. These controls were really of out of place. They essentially enabled you to generate XML script using server controls. So in order to use them, you first had to learn XML script, and then you had to map those constructs into server control tags. And despite being server controls, you weren't able to use familiar server-side code and programming models to work against them. For this release, we put in a new set of server controls that have been developed with a different perspective.

Simply said, the premise is to preserve the server control model in terms development model and patterns, as well as existing ASP.NET 2.0 controls, while enabling key "AJAX" scenarios. The general approach is to model key rich Web application scenarios with a set of targeted controls, while allowing developers to continue to program on the server using managed code. I hope you like the new direction.

Incremental Refreshes and Partial Updates

The first interesting scenario we looked at is the ability to update pages incrementally. The idea is to suppress postbacks, and whole refreshes, and replace them with targeted and partial updates. We've provided this in a manner that is transparent to the page and the server developer as well. It is enabled using the new ScriptManager control as such:

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

One little attribute with lots of magic behind it. Rather than performing a real postback, we simulate a postback using the familiar XMLHTTP object (or in Atlas using the Web.Net.WebRequest class). On the server, the page is processed as if it were a real postback in response to things like submit buttons or controls (including 3rd party ones) that call __doPostBack. For example Page.IsPostBack returns true. Server-side postback events continue to fire, and your event handlers continue to do work as they did before. Now, when it comes time to render the page, the ScriptManager needs to determine what portions of the page have changed. This is where another control, the UpdatePanel comes into play. You can use UpdatePanels to define logical regions within a single page that need to be updated as a chunk. For example, on a search page, I might have a regular <asp:TextBox>, an <asp:Button>, and an <asp:GridView> to display the results. The UpdatePanel would go around the grid as such:

<atlas:UpdatePanel runat="server" id="searchUpdatePanel">
  <ContentTemplate>
    <asp:GridView runat="server" ... />
  </ContentTemplate>
</atlas:UpdatePanel>

The ScriptManager overrides the rendering of the entire page, and instead sends down HTML corresponding to UpdatePanels, in addition to other things like updated title, hidden fields (including view state), generated styles, updated scripts etc.

Now if you have multiple panels on your page, you probably want to update some panels some of the times, and other panels at other times. This is where triggers come into play. For example, if I want to update the search results only when the search button is clicked, I can add an event trigger as follows:

<atlas:UpdatePanel runat="server" id="searchUpdatePanel" Mode="Conditional">
  <Triggers>
    <atlas:ControlEventTrigger ControlID="searchButton" EventName="Click" />
  </Triggers>
</atlas:UpdatePanel>

As you can see, this lets you start enabling a smoother postback-less experience for your users without having to fundamentally change the way you write apps. We have more ideas here, in terms of enabling controls to participate in deeper ways in terms of how they get updated on the client. This next level of intelligence will be added in a future release.

Timed Refreshes

The next interesting scenario was to enable portions of the page to be updated periodically (imagine the Stock symbol view on investor). Again, the idea is to enable this scenario without requiring you to learn XML script, or JavaScript for that matter. We provide a TimerControl that can be used in conjunction with UpdatePanels very simply:

<atlas:TimerControl runat="server" id="myTimer" Interval="60000" />
<atlas:UpdatePanel runat="server" id="stockViewUpdatePanel" Mode="Conditional">
  <Triggers>
    <atlas:ControlEventTrigger ControlID="myTimer" EventName="Tick" />
  </Triggers>
  <ContentTemplate>
    <asp:FormView runat="server" ... />
  </ContentTemplate>
</atlas:UpdatePanel>

Here the TimerControl is smart about working with the ScriptManager to generate XML script and use the script Timer component already present in Atlas, while presenting a very familiar server control model. For example, I might decide to programmatically do some work, and conditionally update the UpdatePanel. As you'd expect the code might look like (very much like handling the Click event of a regular button):

<atlas:TimerControl runat="server" id="myTimer" Interval="60000"
    OnTick="myTimer_Tick" />
<script runat="server">
private void myTimer_Tick(object sender, EventArgs e) {
    if (/* some condition to determine if an update is needed */) {
        stockViewUpdatePanel.Update();
    }
}
</script>

TimerControl also demonstrates something that you'll see more of in time: Atlas-enabled server controls that happen to use Atlas for its richness and disciplined scripting approach to implement (and encapsulate) their client-side logic, rather than using raw JavaScript. (Check out the XML script generated by doing view source) Imagine atlas-enabled DataBound controls, and DataSource controls complementing each other on the client. I'm pretty excited!

AutoComplete

Surely, an Atlas release without some support for autocomplete in an AJAX world would be incomplete. Here the idea is to enable AutoComplete on an actual vanilla <asp:TextBox>. Enter ExtenderControls. (I'll have to blog about the technique in detail in the future)

<asp:TextBox runat="server" id="zipCodeTextBox" />
<atlas:AutoCompleteExtender runat="server" id="ace1">
  <atlas:AutoCompleteProperties TargetControlID="zipCodeTextBox"
      Enabled="true"
      ServicePath="ZipCodes.asmx" ServiceMethod="GetZipCodes" />
</atlas:AutoCompleteExtender>

Yes, while the syntax might be a bit ugly (a constraint is to make this work on ASP.NET 2.0 without inventing new markup syntax), the design-time experience is actually pretty nice (if I may say so myself). Basically, the AutoComplete properties show up on the regular existing TextBox control (ala Extender Providers in Windows Forms). So the design-time story is drop in one of these extenders, and then customize auto-complete properties for any set of textboxes by selecting the textboxes themselves.

Floating Windows (or Overlays)

Apparently these are pretty popular (they're great when used judiciously). Again we used the extender control approach to enable any regular Panel to become a floating and draggable overlay.

<asp:Panel runat="server" id="helpPanel">...</asp:Panel>
<atlas:DragOverlayExtender runat="server" id="doe1">
  <atlas:DragOverlayProperties TargetControlID="helpPanel" Enabled="true" />
</atlas:DragOverlayExtender>

The DragOverlayExtender makes use of the FloatingBehavior present in the drag/drop Atlas library to enable the panel to float around. Another example of using Atlas richness to implement server-side constructs. However we didn't stop here. Very likely, you also want to remember the location of the Panel. For now, you can use a profile property, but again in a very server-control-friendly manner. For example, if I have defined a profile property, "HelpPanelLocation", all I need to do is tell DragOverlayExtender about it, and add a profile service object to the page.

<atlas:ProfileScriptService runat="server" id="profileService" />
<atlas:DragOverlayExtender runat="server" id="doe1">
  <atlas:DragOverlayProperties TargetControlID="helpPanel" Enabled="true"
    ProfileProperty="HelpPanelLocation" />
</atlas:DragOverlayExtender>

The ProfileScriptService control takes care of issuing Web requests to the retrieve profile data, and to save changes (as the panel is repositioned), as well as makes profile data available for purposes of binding.


That's a quick tour of what to check out in terms of the server control model. As you might expect, the extender control model is extensible itself, so you can also build new extenders. We've just started here; there is a ways to go. I'd love to hear about other AJAXish scenarios you think are essential, and you'd love to see server controls enable.

One other thing that is noteworthy is we've included the debug version of Atlas scripts which preserve their formatting (otherwise lost to minimize size of release builds). These were always meant to be included. They contain some useful debug asserts, and we'll add more of those to enable more robust error reporting for script. You can enable debug mode by setting the "debug" property of the <compilation> section to true in web.config.


I want to re-emphasize that while we're enabling a more incremental server-control and server-centric programming model with this build, we're also committed to enabling the next generation of Web applications (should I call them Web 2.0 apps?) that tap into the full richness of today's browser platform. An example of this type of app is Virtual Places, a mashup bringing together Virtual Earth APIs, script components, lots of XML script, and data from various services. I'll delve into programming model once again and outline the overall spectrum of scenarios and vision for development of both server-centric and client-centric rich ASP.NET Web applications in a vision document I am planning. So stay tuned... I hope to get it out early next year!

In the meantime, happy holidays, and happy New Year!

Posted on Wednesday, 12/21/2005 @ 7:48 AM | #ASP.NET


Comments

66 comments have been posted.

Rachit

Posted on 12/21/2005 @ 8:19 AM
Sounds all good after reading this *short* (just kiddin) description! :)

Ramon Durães

Posted on 12/21/2005 @ 8:33 AM
Dear Nik,
I need infomation about download this CTP
tks!
Ramon Durães

Nikhil Kothari

Posted on 12/21/2005 @ 8:51 AM
The bits will be available via http://atlas.asp.net, as well as updated quick starts, and guided walkthroughs.

Joe

Posted on 12/21/2005 @ 12:02 PM
Wow, I was just thinking earlier today that it would be nice to have time-sensitive information automatically update without relying on page refreshes. I'm very excited to try this out! Thanks Nik!

Mads Foersom

Posted on 12/21/2005 @ 12:03 PM
Oh my god... IT SOUNDS SO COOL! Thumbs up! :)

Geoff Van Brunt

Posted on 12/21/2005 @ 1:36 PM
This sounds great. One scenero that is common for us is client side "pop-ups". We have an app in which users fill out a form. Various feilds require lookups for their content. For example one feild requires a project number. We have "fake" window that pops up (after a postback) when the user presses a button next to the field. The pop-up contians the project number and description. The user selects the project and the page posts back.

Of course this is ugly and AJAX is the way to go. We could use an auto-complete to do this, but it still is limiting. What I envision is an extender control that takes a regualar input control (text-box or whatever), a button to do the pop-up, and some kind of panel to "pop-up" when the button is pressed. Idealy, the pop-up could be modal or non-modal, and Atlas will handle updating the input control after selection.

Amir Leshem

Posted on 12/21/2005 @ 3:14 PM
Atlas is nice, but requires some hard work to maintain.
For a friendlier solution please try zumiPage at http://zumiPage.com

Bryant Likes

Posted on 12/21/2005 @ 5:00 PM
Sounds great! I've been thinking of using Atlas for a project I'm working on. When do you think the bits will be posted?

Paul Glavich

Posted on 12/21/2005 @ 8:04 PM
That looks very cool Nikhil. I particularly like the extender concept. Its similar to Winforms which is great for consistency and great as far as ease of development is concerned too. Excellent work.

foobar

Posted on 12/21/2005 @ 11:00 PM
Looks good. Real good. Really really good.

You guys are killing me with the wait. I'm chomping at the bit here.

Can't wait to try it out!

Dion Olsthoorn

Posted on 12/22/2005 @ 2:06 AM
Ah, seems like you guys had a good look at MagicAjax (http://www.magicajax.net/).
Glad you found the right Ajax direction, anyway.

sam

Posted on 12/22/2005 @ 2:24 AM
Hi,

Can you update yours PCD05 samples "Atlas Presentation Slides and Demos" to this December Atlas CTP release ?
I would appreciate.
Thanks :)

Andrey Skvortsov

Posted on 12/22/2005 @ 2:49 AM
So,there's no xpath xml binding support and no mention some kind of xml+xsl datasource(or direct binding to soap for example)?And how about Indigo support-it's still not there(even basicHttpProfile dosen't work now)?Object oriented aspect of framework is useful but full fledged xml support is crucial to success IMHO.I'm very pleased with IE's DOM implementation-I can work with "nodes" and SOMETIMES fallback to BOM(supports in parallel).In most cases directly manipulating xml content more desireable than intermediary transformations.

Thanks.

Andrey Skvortsov

Posted on 12/22/2005 @ 5:16 AM
How about Opera support?

Thanks.

Ryan Heath

Posted on 12/22/2005 @ 6:06 AM
The only drawback with "Incremental Refreshes and Partial Updates" that I see, is that the whole page must be constructed again to create a new valid VIEWSTATE. This process may or may not eliminate the need of an AJAX call ...

If only you could update only a part of the VIEWSTATE ...

Runi Thomsen

Posted on 12/22/2005 @ 8:13 AM
I've been working with ajaxpro and ajax.net for some time now - and this seams to be a much cleaner way of doing ajax. I am looking forward to try it out - when will December CTP be available?

rbfigueira

Posted on 12/22/2005 @ 8:37 AM
>>... and this seams to be a much cleaner way of doing ajax.

yeap :P This avoid to write some javascript code :)
Please note that one difference in the ajax.net is that it avoids completely the Page Pipeline (live-cycle). Perhaps in some future version of Atlas we can have that particularly of choice. Want to avoid Page Pipeline ? Yes, in some causes, Not in other cases. It would be great :P Lets wait….

This “Atlas” news features looks very cool :)

>> when will December CTP be available?
I think it will be today or tomorrow :p

Dragan Panjkov

Posted on 12/22/2005 @ 8:41 AM
What is necesary to implement Atlas on some ASP.NET 2.0 website? I'm a quite newbie to Atlas

Paul

Posted on 12/22/2005 @ 9:21 AM
One aspect that many of the ajax frameworks have in common is that they seem to regard controls on a page as standalone elements that are not linked in any way. Our application seeks to provide a number of different context-sensitive views on certain core data. Ideally it would be nice to cache this data client side (as a 'pseudo' xml data island that is stored in a javascript variable) so that the controls can all share it using XSLT transforms and the application can to some extent work disconnected.

Also, while the ATLAS javascript proxies are interesting, it would be nice to extend them so that they can use client-side proxy code to check a client-side cache first in preference to submitting a new web service request. Only if the data cannot be satisfied by the cache would an ajax call be triggered. We are considering replicating this cache server side for each session as this would allow a degree of fault tolerance and allow server side code to avoid it becoming stale and manage its size.

Does ATLAS seek to address any of these kind of architectural issues that seem inextricably linked to developing rich ajax applications?

Nikhil Kothari

Posted on 12/22/2005 @ 11:21 AM
I believe the build is now out - but for some reason the page isn't updated to say so. I've sent mail to the folks managing the website.

Geoff: I agree, the incremental display, or enhanced builder UI for a textbox using a popup of sorts is an interesting scenario. We've talked about this briefly in the past. Thinking briefly about this, I think its actually possible to build this on top of the extender control framework included in Atlas, so it might be something fun to experiment with (hint, hint...)

Andrey: XML/XPATH binding is important. Its on our plan. As far as XML+XSL goes, you can actually build this component today on top of the framework we ship, using its extensibility. A lot of what we have to do is build the infrastructure to enable us, 3rd party developers and customers to build real scenarios. As time goes, we'll provide more of the basic building blocks out-of-the-box. And we'll be looking into Opera support as well...

Ryan, Runi and rbfigueira: You are right, this framework does not eliminate the need for an "AJAX call" as you put it, or a WebMethod in a Web service (in terms of Atlas terminology). Those are still key, and you can continue to make use of them. What this framework puts out is a way to enable your UI to create better user experiences in a largely declarative way, with minimal impact on pages, without requiring you to write client script. The Web method approach avoids the page, the associated life cycle, and state management (web services are essentially stateless)

Paul: Yes, I agree, caching on the client to improve the network connectivity aspects of your app is super critical. You'll be seeing a lot more here from Atlas in terms of building caching support into the platform, APIs for apps to make use of, as well as further support for integrating with the already existing browser caching of GET request responses. Currently, if you use Web.Net.WebRequest to make GET queries, you already benefit from browser caching based on URLs.

Dragan (and for others new to Atlas): the best way to get started is to download the Atlas vsi from http://atlas.asp.net and use that template to create new projects, to start experimenting with. The web site also has some walkthroughs and quickstarts that demonstrate the basics to get you started.

Interesting to see references to other AJAXish frameworks built on top of ASP.NET, esp. in the context of comments to this post. I guess, I'll have to check them out ... didn't know about their existence. The work we did was inspired by the feedback we got as well as Bertrand's (http://weblogs.asp.net/bleroy) RefreshPanel work. We're somewhat different from the RefreshPanel approach in the sense that we don't use callbacks. The differences stem from the goal to enable the functionality at the page level with minimum impact on lifecycle, form processing, or required updates to the page. We also wanted the model to work for existing controls that are based on postbacks. If there is interest, I can blog about more specifics about the architecture - just ask away.

foobar

Posted on 12/22/2005 @ 12:36 PM
Nikhil,

the download file seems to be the previous Oct release. Can you check it out?

Nikhil Kothari

Posted on 12/22/2005 @ 3:22 PM
The download should be fixed...

Also, Bertrand has some information on event bubbling which is a new feature we added in the client script framework end of things: http://weblogs.asp.net/bleroy/archive/2005/12/22/433864.aspx

Jerry Wang

Posted on 12/22/2005 @ 9:48 PM
the download file still seems to be the previous Oct release.What's the problem?

noetic

Posted on 12/23/2005 @ 1:28 AM
Hi, I've tried the new Atlas release and was very very confuced, when have not found ListView control.
What is it? Have you a new ideas for solving the issues of displaing the listed data without this control?

Runi Thomsen

Posted on 12/23/2005 @ 2:00 AM
When do you think the "December 2005 release" (http://msdn.microsoft.com/asp.net/info/future/atlastemplate/) actually will point to the december release version? The files in the download have the timestamp of october the 24th. and all the new controls are missing. I realy are looking forward to this christmas gift.

rbfigueira

Posted on 12/23/2005 @ 4:39 AM
Hi guys,

The link is correct. I had also the same problem. I have talked with "Bertrand". Some people download the right version (December), some don’t (October). The problem is the "cached" server. This thing is heavily cached, including on the MS side and it may take some time before you see the change.

If you have the problem, please wait, they are working on it. :)

RichB

Posted on 12/23/2005 @ 6:11 AM
Sounds like you've moved more towards the ASP.Net 2 callback approach of sending HTML down the wire rather than data. I think this is a good "backward-compatible" approach, but would also like to see a whole new set of controls developed which only sent data between client and server. I don't know how you serialize web services for Altas, but I sure hope it's in JSON format.

Steve

Posted on 12/23/2005 @ 7:39 AM
"Simply said, the premise is to preserve the server control model in terms development model and patterns, as well as existing ASP.NET 2.0 controls, while enabling key "AJAX" scenarios. The general approach is to model key rich Web application scenarios with a set of targeted controls, while allowing developers to continue to program on the server using managed code. I hope you like the new direction."

I wish I could buy you a beer or give you a hug - this is the news I hoped would someday come!!!

Thanks for the update!! Have a Merry Christmas

RichB - I think it's flexible that you can do this

Nikhil Kothari

Posted on 12/23/2005 @ 9:43 AM
noetic: For now displaying data can be done in one of two ways: Using the standard GridView/DataList controls within UpdatePanels. Or if you want to use the client-side ListView control, you can use it directly via XML script (note you were doing the same thing using the PDC release - just coding the XML script in server control markup). Eventually you'll see atlas-enabled data server controls (I alluded to them in the post as well).

RichB: I guess my note about about atlas-enabled data controls will answer your question as well. The data interchange between the client and server does use JSON.

Steve: Thanks! Enjoy the bits... (and keep in mind that we're still just starting, so feedback is welcome)

Memi Lavi

Posted on 12/25/2005 @ 2:06 AM
When trying (anxiously!) to download the new bits, I always get the October CTP.
Where can I find the new ones, with all the great features you described?

Thanks!

Alex

Posted on 12/25/2005 @ 10:24 AM
Well, it's pretty sad, that after 4 days people still cannot get the December release... How bad the file distribution should be to make it that hard to get new version of the file? Please, please, please, make it available while I have free time to look at it during the holidays!!!! :)

Looking forward to see the new release, especially considering the fact that you, as I understand, completely changed the model... Shouldn't this be called Atlas 2.0? :)))

Giorgio Sardo

Posted on 12/25/2005 @ 12:07 PM
First of all congratulations for Atlas! You guys at MS are doing a really good job...

I'm using the December Build: the Timer control works well, BUT when I create a trigger on a TextChanged event of a textbox nothing happens. I'm using this line:
<atlas:ControlEventTrigger ControlID="TextBox1" EventName="TextChanged" />

I haven't be able to figure out how the ControlValueTrigger trigger works too: it seems like it doesn't bind to any property..
Do u guys have the same issues?

Thanks all, and marry christmas with Atlas :)

Alex

Posted on 12/25/2005 @ 1:49 PM
Well, now it seems that I get newer version (about 460K in size), but trying to run it throws an error from the installer - "Unknown stream header byte sequence"... Ah-ah-ah-ah!!!!!

David

Posted on 12/26/2005 @ 5:58 AM
Like to see a preloader control that could be triggered by another controls event or by page load. And one should be able to decide if it should show a text or a bar or something else that would indicate that loading is going on for the user.
And when a event is triggered you should be able to choose if all other or selected ones or controls in a container should be set to enabled = false untill the loading is done. This to prevent the user from trigger an event twice.

Steve

Posted on 12/27/2005 @ 3:44 PM
If I wanted to use the DragOverlayExtender on a control that is added dynamically at runtime, how would I programmatically add the DragOverlayExtender to the page and set it's properties?

Thanks

Nikhil Kothari

Posted on 12/27/2005 @ 4:21 PM
You could create a new instance of DragOverlayProperties, initialize it, and then add it to the control's TargetProperties property. You need to do this before PreRender.

Jerry Wang

Posted on 12/27/2005 @ 6:50 PM
Thanks. Download problem resolved. I finally got the December version. Haha.

Ivan Porto Carrero

Posted on 12/27/2005 @ 7:17 PM
It looks realy cool the updater panel. But i can only get it to work with really simple controls like the dropdownlist etc but not with the gridview is there a reason for it ?
Do you have any suggestions on how to get it working ?
I have a explanation of my problem here : http://forums.asp.net/1152951/ShowPost.aspx
I always get a javascript error in IE 7 : object required and in the javascript console something more nice. delta has no properties.
Web.WebForms._PageRequest._onFormSubmitCompleted = function(sender, eventArgs) {

Is where it goes wrong.

Paul M

Posted on 12/28/2005 @ 1:17 PM
I am having the same errors. I have 2 dropdownlists. One is populating another within an UpdatePanel. It works fine until the third "non-postback" :). IE crashes and Firefox says: "Object required"

Another issue is the gridview control. When I try to update the grid from a button, I get the error "delta has no properties".

Steve

Posted on 12/29/2005 @ 12:03 PM
I'm unable to get the namespace to add it programmatically?

Steve

Posted on 12/30/2005 @ 8:32 AM
Could someone provide a sample of doing this:
<asp:Panel runat="server" id="helpPanel">...</asp:Panel>
<atlas:DragOverlayExtender runat="server" id="doe1">
<atlas:DragOverlayProperties TargetControlID="helpPanel" Enabled="true" />
</atlas:DragOverlayExtender>


in code with C# dynamically?

Thanks!

Nikhil Kothari

Posted on 12/30/2005 @ 3:59 PM
In Page Load or some point before PreRender:
DragOverlayProperties props = new DragOverlayProperties();
props.TargetControlID = "helpPanel";
props.Enabled = true;
doe1.TargetProperties.Add(props);

Does this not work? Let me know ... if it isn't, then perhaps we have a bug...

Steve

Posted on 12/31/2005 @ 7:36 AM
Thanks Nikhil- I'll give it a go.

FYI:
I've used the Atlas on my development machine, but when I move to the server, I am getting scripting errors.

Line 3852, expected ')'

I get this when in 'debug' mode - once I switched to debug=false I didn't get this error any longer

David Jacobus

Posted on 1/4/2006 @ 4:22 PM
You guys are great!
I have updated many of my pages on my school server to ATLAS using the Dec release. http://gohs.tvusd.k12.ca.us/TeacherWebs/CareerTechnical/dJacobus2/default.aspx
see the projects pages.

Keep up the good work! You will be changing forever how software is built and distributed!

Steve

Posted on 1/6/2006 @ 1:32 PM
Panel helpPanel = new Panel();
Image img = new Image();
img.ImageUrl = "Images/myImage.gif";
helpPanel.Attributes.Add("style", "position:absolute;z-index:2;top:50px;left:50px");
helpPanel.Controls.Add(img);


DragOverlayExtender doe1 = new DragOverlayExtender();
DragOverlayProperties props = new DragOverlayProperties();
props.TargetControlID = "helpPanel";
props.Enabled = true;
doe1.TargetProperties.Add(props);

Page.Controls.Add(helpPanel);
Page.Controls.Add(doe1);


I cannot get this to work - this is called on page_load.

I'm dynamically going to add the image to the page that I want to be 'draggable'

Steve

Posted on 1/6/2006 @ 1:35 PM
Right after my post I realized that i didn't add the helpPanel.ID = "helpPanel";

After that it worked.

After an image is dragged, how do I make it stay 'dragged' - it wants to go back to it's initial position after I am done dragging

Steve

Posted on 1/6/2006 @ 1:36 PM
Actually, it does stay, although a few times it didn't - perhaps it was over another control?

Steve

Posted on 1/7/2006 @ 5:20 PM
We will need a way to have partial rendering, but also normal postbacks on the same page.

I did get the DragOverlayExtender to work great - thanks for the direction on this

Christian Wenz

Posted on 1/10/2006 @ 4:50 AM
Minor correction: I think the element is called <Triggers>, not <UpdateTriggers>! (At least IntelliSense suggests the former, and it seems to work ;) )

Osvaldog

Posted on 1/10/2006 @ 3:48 PM
It's posible to use ProfileScriptService for keep the state from the List? How?

Velio Ivanov

Posted on 1/12/2006 @ 3:15 AM
Hi Nikhil,
Can I use a ProfileScriptService to save the scrolls' position of div/Panel during atlas UpdatePanel post backs?

Philippe DA SILVA

Posted on 1/12/2006 @ 3:40 AM
Hi Nikhil,

I'm a Product Manager for a software company and one of my main concerns regards improving user experience.

I see AJAX and therefore Atlas as an excellent opportunity to improve web user experience by adding richer UI widgets.
Still, I need to keep in mind that some of my users may have some handicaps and that's why Accessibility is for.

So, I fire my question: what would be your recommandations on implementing Atlas but keeping the Accessibility features provided by the .Net framework for standard HTML? I know that some of my developers went into some issues when implementing W3C WAI level 2 (see http://www.w3c.org/wai/).

Nikhil Kothari

Posted on 1/17/2006 @ 9:40 AM
Steve, we are looking at ways for reverting some postbacks to normal postbacks.

Christian, fixed the UpdateTriggers tag to be Triggers. I wrote this code while writing my post, as opposed to copy/paste. Anecdotal stuff: We had UpdateTriggers on ScriptManager at one point, and then subsequently decided it would be fine to require the content of an UpdatePanel to go inside a ContentTemplate, and we could move all UpdateTriggers from ScriptManager to just Triggers on each individual UpdatePanel.

Osvaldog, Velio, you should be able to use ProfileScriptService to implement scenarios you list. There is nothing in the box today, but if you want to go down the route of writing JavaScript, you can use the profile API in script.

Philippe, accessibility is a much larger subject, that I might blog about in the future. High level, by definition, AJAX and Atlas apps do have script, so that gets in the way of one particular accessibility requirement. Other than that, we're looking at making sure interaction is not scoped to mouse; intuitive keyboard behaviors are supported. Today, incremental updates might get in the way of accessibility. There are some tricks with focus you might be able to implement. However, with the right accessibility support it is actually possible to get better accessible experience for AJAX apps - a screen reader doesn't need to read the entire page like it needs to with the postback-based model. To enable such things we're working with the IE team...

ronita

Posted on 1/19/2006 @ 1:40 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

Jeremy

Posted on 1/19/2006 @ 4:14 PM
Hi Nikhil,

I was wondering if you could please post a demo and some source code of the search type functionality you mentioned in the Incremental Refreshes and Partial Updates section? If I am correctly understanding what you're saying then I think this type of functionality is exactly what I'm looking at doing. The problem is I just can't figure out how all this stuff works.

Thanks,
Jeremy

Brian Hearn

Posted on 1/23/2006 @ 12:00 PM
We are using the Dec CTP in a demo for tracking sexual offenders in Florida. When it works it is really impressive. One issue we've been unable to get past is occasionally a call back to the server [WebMethod] (and we are seeing the same behavior for web services) will simply fire and forget. There are no errors; the code executes the async PageMethods.MyServerCall and proceeds. However nothing ever happens on the sever. If I break in the server method it never gets there. The weird thing is it happens intermitantly and mostly after an application rebuild. Once the app is up and running it appears to work fine - almost like something isn't initialized on the first call. In fact, if I call PageMethods.MyServerCall twice, it will often work on the second attempt. Any thoughts?
--Brian

chris

Posted on 2/9/2006 @ 11:15 AM
Hi Nikhil,

First of all, thank you so much for your hard work on this project. It's such a relief not to have to work with the nitty-gritty details myself when I can simply make use of the work you guys have done.

I do have a question about the updatepanel though. I have a textbox with AutoPostBack="true" contained within my panel. When the text is changed, my server code validates and formats it. When I debug the page I see the atlas call going through, and the text is updated on the server, but the client textbox isn't updated. Am I missing something?

Greg Smalter

Posted on 2/10/2006 @ 11:03 PM
I am also having a problem with autopostback controls. In my case, they are drop down lists and radio buttons. For example, I have a list of tasks and a drop down reflecting whose tasks they are. When I change the value of the drop down while debugging, I can see the server generate the new list of tasks, but the client never sees the updated task list.

I have a single update panel wrapping the drop downs and the task list. I have no triggers set up. The Mode for the update panel is set to "always."

Greg Smalter

Posted on 2/12/2006 @ 11:17 PM
I solved the problem and posted the solution on my weblog (http://gregdotnet.blogspot.com/2006/02/atlas-gotchas.html).

Indo Gangsta

Posted on 2/14/2006 @ 8:58 PM
Hi Nikhil, Nice Post Man. Do u have any idea how I can set triggers for controls inside templates? for example, a login control inside the anonymoustemplate of LoginView? Also How can I set triggers dynamically ?

Anna

Posted on 2/20/2006 @ 7:38 AM
I have a problem when try to use Atlas in page which inherits ICallbackEventHandler interface? Could this be a problem?

Sagi Arsyad

Posted on 3/5/2006 @ 6:29 AM
I using VS 2005 Pro and atlas January 2006 HOL
but, My Intelisense don't display DragOverlayerExtender COntrol from Atlas
do you know why ?

Abishek Bellamkonda

Posted on 3/10/2006 @ 11:43 AM
Hi Nikhil,
I have two questions for you.
1. How do i get fading effect using Atlas. It looks like I have to use Glitz or something, but is there any code sample for it?
2. I want to use web services to get some XML data. How can i transform the XML using XSL on client side? I think the code has to be cross browser. Can you point out any code samples please?

Udit Bhide

Posted on 5/10/2006 @ 11:20 AM
Hi Nikhil,

I am trying to set triggers dynamically upon generation of some content. For eg. I am generating a bunch of check boxes after a form submit, and am trying to add a trigger for each checkbox's CheckChanged event to an update panel. I am currently doing this (which doesn't seem to work):

Microsoft.Web.UI.ControlEventTrigger trig = new Microsoft.Web.UI.ControlEventTrigger();
trig.ControlID = someCheckbox.ID;
trig.EventName = "CheckChanged";
SomeUpdatePanel.Triggers.Add(trig);

Static triggers work fine, but this does not. Is there another way to dynamically set triggers? or am I just going about it the wrong way?

Thanks,

Udit Bhide

Posted on 5/10/2006 @ 11:27 AM
BTW, that's "CheckedChanged", not "CheckChanged".

I have tried it with buttons, imagebuttons etc as well. Also, the checkbox is set to autopostback, so I would assume that the trigger is activated on the next postback. It almost appears that this technique does not actually add the trigger to the update panel.

Rishi Maurya

Posted on 5/14/2006 @ 8:20 AM
Nikhil, I have two quick queries....

1. I have used my gridview within an update panel and used the timer conrol to refresh. Whenever any data updated in the database, it is refreshing my gridview without refreshing the page. Is it refreshing all the records in a gridview or simply the changed record?
2. I have further used a button that is used to show the footer of a gridview, but it says "delta has no properties".... why?
The discussion on this post has been closed. Please use my contact form to provide comments.