在repeater中实现分页后,在使用repeater列表无刷新,添加ajax,出现如果列表中有要传递的参数,到其它页面后参数传递不过去,或者,下一页后参数也传不过去,不知道怎么回事儿?

解决方案 »

  1.   


    我单击repeater中的下一页后,再点击修改,进入修改页面,但是参数没传过来
    我设置断点查了,不知道什么原因
      

  2.   


    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>"); 
            }
        }