Atlas Study Notes [1]

Source: Internet
Author: User

The code package and download contains several handson experiments and a sample application compiled based on the Microsoft video tutorial.

1 < Script Type = " Text/XML-script " >
2 < Page xmlns: script = " Http://schemas.microsoft.com/xml-script/2005 " >
3 < Components >
4 < Datasource ID = " Datasource " Serviceurl = " Sampledataservice. asmx "
5 Propertychanged = " Onchange " />
6
7 < Listview ID = " Masterrepeater " Targetelement = " Datacontents "
8 Itemtemplateparentelementid = " Mastertemplate "
9 Propertychanged = " Onchange " >
10 < Bindings >
11 < Binding datacontext = " Datasource " Datapath = " Data "
12 Property = " Data " />
13 </ Bindings >
14 < Layouttemplate >
15 < Template layoutelement = " Mastertemplate " />
16 </ Layouttemplate >
17 < Itemtemplate >
18 < Template layoutelement = " Masteritemtemplate " >
19 < Label targetelement = " Mastername " >
20 < Bindings >
21 < Binding datapath = " Name " Property = " Text " />
22 </ Bindings >
23 </ Label >
24 < Hyperlink targetelement = " Masterdescription " >
25 < Bindings >
26 < Binding datapath = " Description " Property = " Text " />
27 </ Bindings >
28 </ Hyperlink >
29 </ Template >
30 </ Itemtemplate >
31 < Emptytemplate >
32 < Template layoutelement = " Masternodatatemplate " />
33 </ Emptytemplate >
34 </ Listview >
35
36 < Application >
37 < Load >
38 < Invokemethod target = " Datasource " Method = " Select " />
39 </ Load >
40 </ Application >
41 </ Components >
42 </ Page >
43 </ Script >

In the preceding exampleCodeBecause it has not yet been officially released, the relevant documentation of Atlas is not very comprehensive, and there are only some simple instructions and examples. Although there is a quick start example for a newbie on the website, it is a pity that the download version is not provided. It is inconvenient to use it. You should study it yourself first. Two days ago, I saw a document downloaded from Microsoft's website. The address is in another article.

The outermost part is the declaration of XML.

Components contains roughly three parts. The WebService called is previously specified and mapped to the data source name. In the middle part, a repeater class supports the template's server-side client script control, it contains two child controls, which are used to display the name and description and bind the corresponding data fields.

Finally, it is a command like page_load (I would like to think so ).

In this example, the web server actually returns a set of several data object classes.

Testparticipant ialrender. aspxIs the Sample Page. this is actually a simple but common application. The main purpose is to upgrade only the modified content when the page is sent back, rather than sending all the pages back to the server, these are undoubtedly very useful for improving performance. an updatepanel server control is used here. The content in the template can be returned separately and an event can be set to tell it when to update the data, in this example, there is a filter in the drop-down box. Only the matching records are displayed. In this case, you need to refresh the content in updatepanel.

There is another update panel control on this page, which will separately process the content in the Add new record module. however, the trigger method is different because the update will update the content shown above.

In addition, it takes some time to update data in the background. To achieve better user interaction, you can use an update control, which displays prompts to notify users when updating content.ProgramRunning, which can avoid repeated operations. Here, to view the final effect, we artificially add a 2 second delay to the event triggered by the gridview editing event, you can also insert a GIF animation to achieve better results.

This section is based on the video tutorials on the official Microsoft website. For more information, see the demo on the Atlas homepage and the Atlas documentation on how to use these server controls.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.