怎么在回发操作中更新ascx值..
程序代码:
new void DataBind() { switch (Convert.ToByte(ViewState["mestype"])) { case 0: PaObj.DataSource = new SQLserverDAL.buysellDAL().Items(Convert.ToInt32(Session["userid"]), 2, 0); break; ...... default:break; } this.Page1.Recordcount = PaObj.Count; PaObj.AllowPaging=true; PaObj.PageSize=new led.manage().Web_PageSize(); if (page <= 0) page = 1; if (page > PaObj.PageCount) page = PaObj.PageCount; PaObj.CurrentPageIndex = page - 1; this.message.DataSource=PaObj; this.message.DataBind(); this.Page1.Currpage = page; this.Page1.Pagesize = PaObj.PageSize; } protected void OnClick_Mestype(object sender, CommandEventArgs e) { ViewState["mestype"] = Convert.ToByte(); DataBind(); }
在OnClick_Mestype事件中触发DataBind方法,却更新不了Page1中的属性值...请大家帮助看一下,谢谢了..
[[it] 本帖最后由 wggfcusmq 于 2008-8-25 16:48 编辑 [/it]]