asp:Xml datasource : XmlDataSource « XML « ASP.Net






asp:Xml datasource

<!-- File: XmlAdPanel.aspx -->
<%@ Page language="c#" %>
<HTML>
<body>
<form runat="server">
<asp:Xml id=_xml1 runat="server" 
         DocumentSource="sample.xml"  
         TransformSource="sampleTransform.xsl">
</asp:Xml><br/>
<asp:Panel id=_p1 runat=server HorizontalAlign='center'
                  Visible='true' bgColor='cornsilk'>
  <asp:Label id=_l1 runat=server>Panel label</asp:Label>
  <br/>
  <asp:TextBox id=_tb1 runat=server/>
  <br/>
  <asp:Button Text='Push me!' runat=server/>
</asp:Panel> 
</FORM>
  
  </body>
</HTML>


<%--
<items>
  <item>item 1</item>
  <item>item 2</item>
  <item>item 3</item>
  <item>item 4</item>
</items>
--%>

<%--
<xsl:transform xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
               version='1.0'>
                
  <xsl:output method="html" indent='yes'/>

<xsl:template match="item">
  <li>
    <xsl:apply-templates />
  </li>
</xsl:template>

<xsl:template match="items">
  <ul>
    <xsl:apply-templates />
  </ul>
</xsl:template>

<!-- Root template match -->  
<xsl:template match="/">
  <xsl:apply-templates/>
</xsl:template>

</xsl:transform>


--%>
           
       








Related examples in the same category

1.Caching XML Data in an XmlDataSource Control
2.Create asp XmlDataSource
3.Binding XML Data from an XmlDataSource Control
4.Using Inline XML Data in an XmlDataSource Control
5.Binding XML Data from Other Sources
6.Updating Data through XmlDataSource Control
7.Programmatically Creating an XmlDataSource Control
8.Handling XmlDataSource Events
9.Fill XmlDataSource with your code
10.XmlDataSource and XML document
11.Use ItemTemplate and XPath to display data from XmlDataSource
12.Using the XmlDataSource control to consume an RSS feed
13.Enter an XML filename or raw XML starting with