首页软件新闻工具软件操作系统办公软件聊天工具多媒体网页制作网页设计网站运营平面设计作品欣赏数据库程序组网
Ghost | Kugoo | 遨游 | Xp | Dw | Fw | Flash | Ps | 迅雷 | CD | ill | CAD | 五笔 | Word | Excel | Wps | Msn | QQ | 学电脑 | Asp | Php | Jsp | 3Dmax | 海报 | 包装 | 标志 | 地产 | 插画

使用 ASP.NET Atlas PageNavigator控件实现客户端分页导航

来源:佚名(读取中...) 2006-4-19 【字体: 】 切换为

DataNavigator对象只有一个属性:

dataView:对某个DataView对象的引用,这个DataNavigator将把页面导航的操作应用到其上。您应该总是指定这个属性。
另外,要使用DataNavigator控件,您还需要提供一些拥有一些指定commandName属性的Atlas Button,以触发相应的页面导航操作。这些Button的parent属性应该设定为此DataNavigator控件,以保证DataNavigator能够捕获到这些Button发出的命令。

您可以指定您的Button的commandName属性为如下五个string,每个都有不同的含义:

page:将当前页面索引转为命令参数(command argument)中指定的值。通过这个命令我们可以快速的改变页面的索引。
nextpage:切换到下一页(如果存在下一页)。
previouspage:切换到上一页(如果存在上一页)。
firstpage:切换到第一页。
lastpage:切换到最后一页。
OK,MSDN般枯燥的介绍到此为止吧,让我们通过一个实例来熟悉DataNavigator的使用方法。

首先我们需要暴露一个Web Service,以便Atlas页面使用。该Web Service将返回100条记录。下面就是这个Web Service的代码,非常易于理解,这里不赘。

Web Service
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Web;
using System.Web.Caching;
using System.Web.Services;
using System.Web.Services.Protocols;
using Microsoft.Web.Services;

//
// For simplicity this example demonstraes storing and  manipulating
// the data objects in memory. A database can also be used.
//
   
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MyDataService : DataService
{
    static List<Entry> _data;
    static object _dataLock = new object();

  

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

    相关新闻
    用户评论
数据载入中,请稍后……
评论内容:不能超过100字,不需审核,请自觉遵守互联网相关政策法规。
发表评论: 匿名发表 用户名: loading 位网友发表了评论 查看评论
(0/100)
    推广服务
IT部落推荐阅读
·生活服务
·精彩图文
·赞助商链接