repeater分页并使用ajax问题

ww7610 2012-05-03 11:06:47
在repeater中实现分页后,在使用repeater列表无刷新,添加ajax,出现如果列表中有要传递的参数,到其它页面后参数传递不过去,或者,下一页后参数也传不过去,不知道怎么回事儿?
...全文
57 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lugyedo 2012-05-03
  • 打赏
  • 举报
回复
加断点调试,这么说不明白是什么情况
ww7610 2012-05-03
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 的回复:]

贴代码吧.
[/Quote]

1.这个是我上一个页面的修改按钮,这个按钮在repeater中,这个页面,我使用了局部无刷新
<a href='followvisitAdd.aspx?contentid=<%#Eval("contentid") %>&followuptime=<%#Eval("Followuptime","{0:yyyy-MM-dd}") %>&followupcontent=<%#Eval("Followupcontent") %>&followupresults=<%#Eval("Followupresults") %>&userId=<%=userId %>&mid=<%=(int)Enums.MenuType.随访信息 %>'><asp:Label ID="update" runat="server" Text="修改"></asp:Label></a>


2.这个是我第二页代码,修改页面代码,如果单击下一页,我的ui就为0,如果不下一页在第一页,ui就有数据,如果要是点击下一页,在点击上一页,ui就没有数据了,我当时怀疑是不是分页有问题?
protected void btnSubmit_Click(object sender, EventArgs e)
{
//int mi = (int)Enums.MenuType.随访信息;
int mi = (int)Enums.MenuType.随访信息;
int ui = Utils.GetQueryInt("userId");
if (string.IsNullOrEmpty(Request.QueryString["contentid"]))
{ // 操作类型:添加
// 添加随访记录
string strcontant = this.txtcontant.Text;
string strresults = this.txtresults.Text;
int upuserid = Utils.GetQueryInt("userid");
DateTime strtime = this.txttime.Text.ToDateTime();
Addfollowup(strcontant, strresults, upuserid,strtime);
Response.Write("<script>alert('添加成功');window.location.href='followupvisit.aspx?mid=" + mi + "&userid=" + ui + "';</script>");
}
else
{
// 操作类型:编辑
// 编辑随访记录
int conid = Utils.GetQueryInt("contentid");
string follcon = this.txtcontant.Text.Trim();
string follres = this.txtresults.Text.Trim();
DateTime tim = this.txttime.Text.ToDateTime();
Updfollowup(conid,follcon,follres,tim);
Response.Write("<script>alert('修改成功');window.location.href='followupvisit.aspx?mid=" + mi + "&userid=" + ui + "';</script>");
}
}
IT-Style 2012-05-03
  • 打赏
  • 举报
回复
贴代码吧.
ww7610 2012-05-03
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

加断点调试,这么说不明白是什么情况
[/Quote]

我单击repeater中的下一页后,再点击修改,进入修改页面,但是参数没传过来
我设置断点查了,不知道什么原因
小龙卷卷风 2012-05-03
  • 打赏
  • 举报
回复
这哪知道,贴代码吧 少年

62,267

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧