如何维护页面,但问题的变化 [英] how to maintain page but question change

查看:64
本文介绍了如何维护页面,但问题的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有60个问题..



我希望页面每页显示1到15个问题。当单击按钮时,页面仍然保持,但问题更改为16-30.PLease帮助我:(

i got 60 question..

i want page to appear 1- 15 questions per page. when clicking button next the page still maintain but the question change to 16-30.PLease help me : (

推荐答案

使用Gridview显示问题,然后使用分页,为网格视图设置AllowPaging =True并设置PageSize =15,然后在网格视图的pageindexchanging事件上写下面的代码



Use Gridview to display questions and then use pagination , for that set AllowPaging="True" for grid view and set PageSize="15", and then write following code on pageindexchanging event of grid view

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    GridView1.PageIndex = e.NewPageIndex;
    loadgrid(); // function to load gridview

}


你应该使用ajax部分渲染功能您应该使用更新面板来消除问题网格。

并使用asynchpostbacktrigger在gridview上加载下一个问题集。



点击此链接: http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers [ ^ ]
You should use ajax partial rendering feature and for that you should use update panel to disaply questions grid.
And use asynchpostbacktrigger to load next question sets on gridview.

follow this link :http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers[^]


这篇关于如何维护页面,但问题的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆