文本框的页码 [英] Textbox for page number

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

问题描述

我刚刚开始学习asp.net,我想提出一个文本框在我GridView控件,让用户输入任何页面的用户不想去,而不是点击第一个/ preV /下页/尾按钮。

I just started learning asp.net, I want to put a textbox in my gridview control to let the user input whichever page the user wanna go instead of click First/Prev/Next/Last buttons.

在GridView控件pagersetting模式,我无法找到的选项创建这种功能。有没有办法在ASP.net做到这一点?

Within the gridview control pagersetting mode, I can't find an option to create this kind of function. Is there a way to do this in ASP.net?

推荐答案

启动Visual Studio - >文件 - >新建项目 - >网络 - > ASP.NET动态数据实体的WebApplication

Start Visual Studio -> File -> New Project -> Web -> ASP.NET Dynamic Data Entities WebApplication

在解决方案资源管理扩展动态数据 - >文件夹的内容

In solution explorer expand Dynamic Data -> Content folder

有一个名为GridViewPager.ascx一个真棒用户控件:

There is an awesome user control called GridViewPager.ascx:

将它添加到您的项目,并指定其为GridView中PagerTemplate:

Add it to your project and specify it as the PagerTemplate in the GridView:

<PagerTemplate>
   <asp:GridViewPager runat="server" />
</PagerTemplate>

您可能需要稍微调整用户控件,为特定的项目工作,但是这应该给你一个良好的开端。

You may need to tweak the user control slightly to work for your specific project but this should give you a good start

这篇关于文本框的页码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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