留言簿
留言成功,请等待站长审核,谢谢支持!
2009-09-14 15:04 cnblogs CodeLife
留言版这里的分页也是用这个控件做的么?
回复:您好,留言簿中的分页用的是MvcPager,不是AspNetPager,因为这个主页是用ASP.NET MVC开发的。
2009-09-14 09:54 刘强
支持杨哥继续做分页控件
回复:谢谢支持!
2009-09-12 14:47 余魁
网站用mvc写的?能否给份源代码?我正在学习mvc.找不到好的例子.
回复:您好,这个主页是重新用MVC写的,不过因为时间不多,匆匆忙忙,没有好的架构甚至没有多少注释,所以不建议初学者用来做为学习的示例,另外也关系到网站的安全,所以无法提供源代码,请谅解。asp.net MVC已问世快两年了,网上的例子已经不少了,微软官方甚至也提供了oxite这个示例,您看到 http://www.codeplex.com/oxite 看看。谢谢!
2009-09-12 13:59 wangzheng
你好,你的分页控件变的的却很好,但我用的时候怎么不能调整PagingButtonSpacing这个属性,不论我怎么调都不能改变button之间的距离
回复:您用的什么浏览器?什么版本的分页控件?在分页控件生成的html源代码中有类似于style="margin-right:5px;"这样的代码吗?
2009-01-21 12:52 hanyuice
能不能给几个不用存储过程的例子呢?<br>是否只需要指定recordcount属性就可以了吗?我按照这样做了之后,发现可以分页,但不能出现跳转,所以数据还是在一页显示!
回复:您好,示例项目中就有不用存储过程的例子了。
2009-01-16 14:44 zhongmr
后台的代码: <br>protected void BindDataView1()<br> {<br> string strSql = GetCondition();<br> DB db = new DB();<br> DataSet ds = db.GetRecByDataSet(strSql);<br> GridView1.DataSource = ds.Tables[0];<br> GridView1.DataKeyNames = new string[] { "BillID" };//主键<br> GridView1.DataBind();<br> AspNetPager1.RecordCount = GridView1.PageCount * GridView1.PageSize;<br>}<br>protected void AspNetPager1_PageChanged(object sender, EventArgs e)<br> {<br> this.GridView1.PageIndex = AspNetPager1.CurrentPageIndex - 1;<br> BindDataView1();<br> }<br><br>页面代码<br><asp:UpdatePanel ID="UpdatePanel1" runat="server"> <br> <ContentTemplate><br> <tr><br> <td align="left"> <webdiyer:aspnetpager id="AspNetPager1" runat="server" PageSize="15" <br> AlwaysShow="True" OnPageChanged="AspNetPager1_PageChanged" <br> ShowCustomInfoSection="Left" CustomInfoSectionWidth="240px" <br> ShowPageIndexBox="always" PageIndexBoxType="DropDownList"<br> <br> CustomInfoHTML="第<font color='red'><b>%currentPageIndex%</b></font>页,共%PageCount%页,每页显示%PageSize%条记录" <br> PagingButtonSpacing="6px"></webdiyer:aspnetpager></td></tr> <br> <asp:GridView ID="GridView1" BorderColor="#6C7DA2" runat="server" <br> AutoGenerateColumns="False" Width="1000px" <br> OnRowDataBound="GridView1_RowDataBound" AllowPaging="True" PageSize="15" <br> OnRowCommand="GridView1_RowCommand" onrowediting="GridView1_RowEditing" ><br> <Columns><br>。。。<br><br> </Col
2009-01-16 14:34 zhongmr
先谢谢控件的作者!<br>看了那些留言的内容使我受益匪浅!<br>那个楼下的找不到资源文件的问题,可以删除Wuqi.Webdiyer.AspNetPager项目下文件aspnetpager.cs前面+号点开后,下面的AspNetPager.en.resx这个文件!呵呵。我一开始也在弄这个问题!我下的版本是7.2的!<br>看了作者的源码,我有个疑问,查询后将数据在gridview中显示,要实现无刷新分页,我将gv和分页控件都放如UpdatePanel中,点分页页面还是抖动的!怎么实现!
2009-01-16 13:57 awoya
create PROCEDURE [dbo].[HouseInfo_GetOrderNumber]<br>AS<br> select count(ID) from HouseInfo<br> RETURN<br><br>GO<br><br><br>总是提示:<br>为过程或函数 HouseInfo_Pager 指定的参数太多。<br><br>我使用7.2+SQL2000请指点,谢谢!!
2009-01-16 13:55 awoya
protected void Page_Load(object sender, EventArgs e)<br> {<br> if (!IsPostBack)<br> {<br> int totalOrders = (int)ynfwClass.ExecuteScalar(CommandType.StoredProcedure, "HouseInfo_GetOrderNumber");<br> AspNetPager1.RecordCount = totalOrders;<br> bindData();<br> }<br> }<br><br> public void bindData()<br> {<br> Repeater1.DataSource = ynfwClass.ExecuteReader(CommandType.StoredProcedure, "HouseInfo_Pager",<br> new SqlParameter("@startIndex", AspNetPager1.StartRecordIndex),<br> new SqlParameter("@endIndex", AspNetPager1.EndRecordIndex));<br> Repeater1.DataBind();<br> }<br><br> public void AspNetPager1_PageChanged(object src, EventArgs e)<br> {<br> bindData();<br> <br> }
2009-01-15 15:43 fqmail
使用vs2005开发wap,AspNetPager使用有问题。<br><br>wap2.0使用xhtml mobile,能识别div,不存在问题。<br>wap1.0使用wml,既不识别table,也不识别div。引起页面异常。<br><br>建议:LayoutType属性只有Table和Div两个枚举。如果再加上个Empty,外部不包裹任何的html容器可解决此问题。