Atlas快速入门之实战Atlas(4)
<atlas:UpdatePanel ID="id1" runat="server"> <asp:DataList ID="DataList1" runat="server" <asp:XmlDataSource ID="XmlDataSource1" runat="server" <Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"
Font-Bold="True"></asp:Label>
<atlas:UpdateProgress ID="pro" runat="server">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server"
ImageUrl="~/loading.gif" />
</ProgressTemplate>
</atlas:UpdateProgress>
BackColor="LightGoldenrodYellow" BorderColor="Tan"
BorderWidth="1px" CellPadding="2" ForeColor="Black"
Width="755px">
<FooterStyle BackColor="Tan" />
<SelectedItemStyle BackColor="DarkSlateBlue"
ForeColor="GhostWhite" />
<AlternatingItemStyle BackColor="PaleGoldenrod" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<ItemTemplate>
<b>
<%#XPath("title")%>
</b>
<br />
<i>
<%#XPath("description") %>
</i> <%#XPath("pubDate")%>
<br />
<a href='<%#XPath("link") %>'>Link</a>
<br />
<br />
</ItemTemplate>
</asp:DataList>
XPath="rss/channel/item"></asp:XmlDataSource>
</ContentTemplate>
<atlas:ControlEventTrigger ControlID="Button1"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button2"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button3"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button4"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button5"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button6"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button7"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button8"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button9"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button10"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button11"
EventName="Click" />
</Triggers>
</atlas:UpdatePanel>
...
在上面的代码中,我们除了为每一个button按钮都设置了事件触发器外,还在DataList控件中,通过<%#XPath("description") %>的方式,将读取并分析好的XML文件绑定显示出来。下面,我们就开始撰写后端的处理读取到的RSS XML文件的代码。
相关新闻>>
- 发表评论
-
- 最新评论 更多>>