• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

设置更改GridView分页的计时器

用户头像
it1352
帮助1

问题说明

我正在从数据库中检索图像,并使用计时器一次显示在detailsview中,但是使用计时器,整个图像令人耳目一新,我只想在detailview中显示幻灯片,所以任何人都可以帮我吗

Hi i am retriving images from database and showing in the detailsview one by one using the timer but with timer the whole image is refreshing i want to just show slideshow in the detailview so can anyone help me please

正确答案

#1
听起来像您想使用AJAX,ASP.NET AJAX库具有幻灯片组件.
Sounds like you want to use AJAX, and the ASP.NET AJAX library has a slideshow component.
您好
将代码放在以下事件中.

受保护的void gvTimer_OnPageIndexChanging(object sender,GridViewPageEventArgs e)
{
gvTimer.PageIndex = e.NewPageIndex;
gvTimer.DataSource =您的数据源
gvTimer.DataBind();
}


在计时器中

受保护的void timerGrid_Tick(对象发送者,EventArgs e)
{
gvTimer.PageIndex = gvTimer.PageIndex 1;
gvTimer.DataSource =您的数据源
gvTimer.DataBind();
}
Hi
Place the code in the following events.

protected void gvTimer_OnPageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvTimer.PageIndex = e.NewPageIndex;
gvTimer.DataSource = Your Datasource
gvTimer.DataBind();
}


In Timer

protected void timerGrid_Tick(object sender, EventArgs e)
{
gvTimer.PageIndex = gvTimer.PageIndex 1;
gvTimer.DataSource = Your Datasource
gvTimer.DataBind();
}

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfgchf
系列文章
更多 icon
同类精品
更多 icon
继续加载