• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    即刻完成你的ASP.NET程序

    發布: 2008-10-13 12:05 | 作者: 不詳 | 來源: ProgramFan | 查看: 142次 | 進入軟件測試論壇討論

    領測軟件測試網

    看到這里,我們已經感覺到了“簡單”,但是,在實際的應用中,像這種直接顯示一個表的情況是很少的。所以,我們需要其他更多的功能。最直接的,我們需要Select語句的返回結果。

    <%@ Register TagPrefix="Super" Namespace="Superexpert.Data"
    Assembly="Superexpert.SuperDataGrid" %>

    <Super:SuperDataGrid
    ConnectionString="Server=localhost;UID=sa;pwd=secret;database=Northwind"
    CommandText="Select ProductName, CategoryName
    From Products, Categories Where Products.CategoryID=Categories.CategoryID"
    Runat="Server" />

      具體效果請看:
    http://www.superexpertcontrols.com/superdatagrid/samples/sample2.aspx

      以上代碼返回Select語句的結果。在這里,我們見到一個新的屬性:

      CommandText:和Command一樣,就是Select語句;

     。、數據排序

      在DataGrid中,數據排序雖然簡單,但是代碼還是不少。我們現在來看SuperDataGrid中怎樣給數據排序:

    <%@ Register TagPrefix="Super" Namespace="Superexpert.Data"
    Assembly="Superexpert.SuperDataGrid" %>

    <form runat="Server">
    <Super:SuperDataGrid
    ConnectionString="Server=localhost;UID=sa;pwd=secret;database=Pubs"
    TableName="Titles"
    EnableSorting="True"
    Runat="Server" />
    </form>

      具體效果請看:
    http://www.superexpertcontrols.com/superdatagrid/samples/sample3.aspx

      仔細看以上代碼,其實就是設置了一個EnableSortinga屬性為真。也就是打開排序功能。需要仔細注意的一點,要將SuperDataGrid包括在Form中。

     。、數據分頁

      在ASP中,很多朋友會為分頁煩惱,現在,我們看看SuperDataGrid中怎樣分頁:

    <%@ Register TagPrefix="Super" Namespace="Superexpert.Data"
    Assembly="Superexpert.SuperDataGrid" %>

    <form runat="Server">
    <Super:SuperDataGrid
    ConnectionString="Server=localhost;UID=sa;pwd=secret;database=pubs"
    TableName="Titles"
    EnablePaging="True"
    PageSize="3"
    PagerStyle-Mode="NumericPages"
    Runat="Server" />
    </form>

      具體效果請看:
    http://www.superexpertcontrols.com/superdatagrid/samples/sample4.aspx

      我們來看看SuperDataGrid的幾個新屬性:

      EnablePaging:首先,我們當然要打開數據分頁;

      PageSize:和DataGrid一樣,每頁數據顯示的條數;

      PagerStyle-Mode:和DataGrid一樣,頁碼顯示方式;

      

    文章來源于領測軟件測試網 http://www.kjueaiud.com/

    52/5<12345>

    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備2023014753號-2
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>