国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院

首頁 > 開發(fā) > XML > 正文

分別用DataGrid、Repeater、DataList綁定XML數(shù)據(jù)的例子

2024-09-05 20:55:43
字體:
供稿:網(wǎng)友
  • 網(wǎng)站運(yùn)營seo文章大全
  • 提供全面的站長運(yùn)營經(jīng)驗(yàn)及seo技術(shù)!
  • data.aspx

    <%@ import namespace="system" %>
    <%@ import namespace="system.io" %>
    <%@ import namespace="system.xml" %>
    <%@ import namespace="system.data" %>
    <%@ import namespace="system.data.ado" %>

    <script language="vb" runat=server>
    dim ds as dataset = new dataset()
       sub page_load(sender as object, e as eventargs)
          dim fs     as filestream
          dim reader as streamreader
          dim path   as string
          path = server.mappath( "books.xml" )
          fs = new filestream(path, filemode.open, fileaccess.read)
          reader = new streamreader(fs, encoding.default)
          ds.readxml(reader)
          grid1.datasource = ds.tables("book").defaultview
          grid1.databind()
          repeater1.datasource = ds.tables("book").defaultview
          repeater1.databind()
          datalist1.datasource = ds.tables("book").defaultview
          datalist1.databind()
       end sub

       sub changepage(sender as object, e as datagridpagechangedeventargs)
          grid1.datasource = ds.tables("book").defaultview
          grid1.databind()
          repeater1.datasource = ds.tables("book").defaultview
          repeater1.databind()
          datalist1.datasource = ds.tables("book").defaultview
          datalist1.databind()
       end sub

       sub datalist_itemcommand(sender as object, e as datalistcommandeventargs)
         select case e.commandsource.text
        case "詳細(xì)"
            datalist1.selectedindex = e.item.itemindex
         case "關(guān)閉"  
            datalist1.selectedindex = -1
         end select
         datalist1.datasource = ds.tables("book").defaultview
         datalist1.databind()
       end sub

    </script>
    <html>
    <head>
    </head>
    <body style="background-color:f6e4c6">
    <form runat="server">
    <p>datagrid演示</p>
    <asp:datagrid
        allowpaging="true"
        pagesize="10"
        onpageindexchanged="changepage"
        pagerstyle-horizontalalign="right"
        pagerstyle-nextpagetext="下一頁"
        pagerstyle-prevpagetext="上一頁"
        headerstyle-backcolor="#aaaadd"
        alternatingitemstyle-backcolor="#ffffc0"
        bordercolor="black"
        cellpadding="2"
        cellspacing="0"
        id="grid1" runat="server"/>

    <p>repeater演示</p>
    <table border="1">
    <asp:repeater id="repeater1" runat="server">

    <template name="headertemplate" >
    <tr align="center"><th >書名</th><th>作者</th><th>價(jià)格</th></tr>
    </template>

    <template name="itemtemplate">
    <tr><td><%# container.dataitem("title") %></td>
            <td><%# container.dataitem("last-name") %>  <%# container.dataitem("first-name") %></td>
            <td><%# container.dataitem("price") %></td>
    </tr>
    </template>

    </asp:repeater>
    </table>


    <p>datalist 演示</p>
    <asp:datalist id="datalist1" runat="server"
         border="1" bordercolor="black"
         cellpadding="2" cellspacing="0"
         headerstyle-backcolor="#888888"
         itemstyle-backcolor="#eeeeee"
         selecteditemstyle-backcolor="#ffffff"
         headertemplate-colspan="3"
         onitemcommand="datalist_itemcommand" >

    <template name="headertemplate" >

    </template>


    <!--內(nèi)容模版-->
    <template name="itemtemplate">
    書名:<%# container.dataitem("title") %>
    <asp:linkbutton id="detail" runat="server" text="詳細(xì)" forecolor="#333333"/>
    </template>


    <template name="selecteditemtemplate">
    書名:<%# container.dataitem("title") %><br>
    作者:<%# container.dataitem("last-name") %>  <%# container.dataitem("first-name") %><br>
    價(jià)格:<%# container.dataitem("price") %><br>
    <div align="right"><asp:linkbutton id="title" runat="server" text="關(guān)閉" forecolor="#333333"/></div>
    </template>

    </asp:datalist>

    </form>
    </body>
    </html>


    books.xml
    <?xml version="1.0" encoding="gb2312"?>
    <newdataset>
      <xsd:schema id="newdataset" targetnamespace="" xmlns="" xmlns:xsd="http://www.w3.org/1999/xmlschema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <xsd:element name="book">
          <xsd:complextype content="elementonly">
            <xsd:all>
              <xsd:element name="title" minoccurs="0" type="xsd:string"/>
              <xsd:element name="first-name" minoccurs="0" type="xsd:string"/>
              <xsd:element name="last-name" minoccurs="0" type="xsd:string"/>
              <xsd:element name="price" minoccurs="0" type="xsd:float"/>
            </xsd:all>
          </xsd:complextype>
        </xsd:element>
        <xsd:element name="newdataset" msdata:isdataset="true">
          <xsd:complextype>
            <xsd:choice maxoccurs="unbounded">
              <xsd:element ref="book"/>
            </xsd:choice>
          </xsd:complextype>
        </xsd:element>
      </xsd:schema>
    <!-- this file represents a fragment of a book store inventory database -->
    <bookstore>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="novel" publicationdate="1967" isbn="0-201-63361-2">
        <title>the confidence man</title>
        <author>
          <first-name>herman</first-name>
          <last-name>melville</last-name>
        </author>
        <price>11.99</price>
      </book>
      <book genre="philosophy" publicationdate="1991" isbn="1-861001-57-6">
        <title>the gorgias</title>
        <author>
          <name>plato</name>
        </author>
        <price>9.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
      <book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
        <title>the autobiography of benjamin franklin</title>
        <author>
          <first-name>benjamin</first-name>
          <last-name>franklin</last-name>
        </author>
        <price>8.99</price>
      </book>
    </bookstore>

    </newdataset>
    發(fā)表評論 共有條評論
    用戶名: 密碼:
    驗(yàn)證碼: 匿名發(fā)表
    国产激情自拍_国产9色视频_丁香花在线电影小说观看 _久久久久国产精品嫩草影院
    中文字幕免费在线视频| 在线看黄网站| 国产美女视频一区二区三区| 伊人222成人综合网| 国产啊啊啊视频在线观看| 精品麻豆一区二区三区 | 中文字幕日本在线| 久草.com| 国产二级片在线| 天堂网中文在线| 国产农村一级特黄α**毛片 | 免费国产阿v视频在线观看| 九九热免费视频| 国产精品视频白浆合集| 在线a人片免费观看视频| 黄色片视频在线观看| 国产黄色大片在线观看| www操操操| 中文乱码字幕高清在线观看| 久久精品视频免费看| 精品成人一区二区三区免费视频| 免费三级毛片| 国产成人精品综合网站| 黄色三级视频在线观看| 99久久国产视频| 国产盗摄精品一区二区酒店| 欧美日韩视频精品二区| 在线国产91| 精品176二区| 国产福利一区二区在线精品| 日本中文字幕在线播放| 免费a级毛片在线观看| 亚洲欧美国产另类首页| 国产黄视频在线观看| 午夜av在线免费观看| www.狠狠艹| av三级在线观看| 国产黄色片中文字幕| 国产黄色在线免费观看| 国产区在线视频| 国产精品伦一区二区三区视频| 天天av综合网| 国产视频二区三区| 99热在线免费播放| 国产麻豆免费| 国产精品四虎| 国产激情在线视频| 国产福利一区二区在线精品| 国产不卡一卡2卡三卡4卡5卡在线| 成人日韩欧美| 中文字幕网站视频在线| 国产精品视频福利一区二区| 9999在线视频| www.91在线播放| 久热中文字幕在线观看| 国产在线高潮| 国产a级网站| 欧美日韩在线视频免费观看| 国产麻豆精品入口在线观看| 国产精品伦理一区二区三区| 在线伊人免费视频| 香蕉视频网站在线观看| 豆国产97在线|亚洲| 国产aⅴ超薄肉色丝袜交足| 99综合精品久久| 日本电影在线观看| 国产精品亚洲色图| 91欧美在线视频| 亚洲xxxxxx| 国产区av在线| www.成人.com| 91在线高清| 国产精品臀控福利在线观看| 国产高清一级片| 国产中文在线| 一区二区免费播放| 国产麻豆视频免费观看| 色欧美在线观看| 国产精品第八页| 青草青在线视频| 国产成人综合美国十次| 国内自拍视频在线观看| av在线不卡网站| 91精品国产高久久久久久五月天| 免费久久网站| 亚洲第一成人在线视频| 国产粉嫩一区二区三区在线观看| 免费a在线看| av在线不卡播放| 精品视频一二三| 国产高清自拍视频在线观看 | 噜噜噜噜噜在线视频| 91精品专区| 最近中文字幕av免费高清 | 在线亚洲不卡| 国产黄色一级片| 中文字幕有码在线视频| 九九热精品在线视频| 先锋影音av中文字幕| 精品a在线观看| 精品视频一二区| 国产黄色免费| 中文av字幕| 在线观看视频污| 在线视频观看国产| 亚洲午夜久久久久中文字幕| 国产日本视频| 国产传媒在线播放| 在线中文字幕资源| 在线一区二区三区精品| 在线看黄网址| 日本黄在线观看| 久久五月精品| 国产剧情av在线| 国产无遮挡又黄又爽免费网站| 国产一区精品| 精品伦理一区二区| 亚洲成人福利| 二人午夜免费观看在线视频| 五月天婷婷基地| 国产盗摄精品一区二区酒店| 国产黄色免费看| 男人天堂v视频| 国产精品冒白浆免费视频| 国产激情视频一区二区三区| 尤物在线视频观看| 九九在线视频| 999福利在线视频| 国产主播色在线| 在线中文字幕av| 丁香在线视频| 精品极品三级久久久久| 免费在线黄色av| 国产91足控脚交在线观看| www.五月色.com| 2021av天天| 久久久久久77777| 精品推荐国产麻豆剧传媒| 美女国产在线| 亚洲欧美小说国产图片| 国产偷倩在线播放| 九色精品视频在线观看| 影音先锋中文字幕在线| 最近高清中文在线字幕在线观看| 国产黄在线观看| 国产免费av网站| 日本亚洲欧美| 精品999视频| 国产视频第一区| 丁香婷婷在线| 久久精品亚洲7777影院| 精品偷拍激情视频在线观看| 国产在线观看网站| 麻豆精品传媒视频观看| av在线官网| 69免费视频| 精品乱码一区二区三四区视频| 中文字幕第一页在线| 最近中文字幕在线中文视频| 成年网站免费入口在线观看| 青青草中文字幕| wwww在线观看| www操操操| 牛牛热在线视频| heisi视频网在线观看| 亚洲精品一区中文字幕电影| 国产jizz| h网址在线观看| 美女网站在线观看| 成人欧美亚洲| 国产中文字幕在线看| 国产裸舞福利在线视频合集| 丁香六月婷婷| 国产福利av网站| 天天干天天摸| 国产在线激情视频| 国产视频精选在线| 中文在线视频| 免费观看久久久久| 国产亚av手机在线观看| 国产传媒在线播放| av网址在线看| 毛片在线视频| 国产精品黄页网站在线播放免费| 97影院秋霞午夜在线观看| 亚洲an天堂an在线观看| 国产在线一区二区视频| 国产l精品国产亚洲区在线观看| 天堂网中文在线| 国产麻豆精品高清在线播放| 国产黄色片在线观看| 欧美日韩国产亚洲沙发| 国产香蕉视频在线观看| 一本大道香蕉久久| 最近中文字幕mv2018在线高清| 国产二区三区在线| 波多野结衣久久高清免费| 国产精品四虎| 激情在线视频播放| 亚洲伊人网在线观看|