protected void Page_Load(object sender, EventArgs e) { string userid = Request.QueryString["userId"]; //从地址栏获取传过来的值 if (!IsPostBack) //回传提交,如果不是第一次执行,则不走这段代码 { mdluser = blluser.GetModel(int.Parse(userid)); TBusername.Text = mdluser.userLoginName; TBuserTrue.Text = mdluser.userTrueName; TBuserpwd.Text = mdluser.userPass; TBuserEmail.Text = mdluser.userEmail; TBuserTel.Text = mdluser.userTel; } }
private void ShowInfo(int userId) { rr2.BLL.userInfo bll = new rr2.BLL.userInfo(); rr2.Model.userInfo model = bll.GetModel(userId); this.lbluserId.Text = model.userId.ToString(); this.txtuserLoginName.Text = model.userLoginName; this.txtuserTrueName.Text = model.userTrueName; this.txtuserPass.Text = model.userPass; this.txtuserEmail.Text = model.userEmail; this.txtuserTel.Text = model.userTel; this.txtflag.Text = model.flag.ToString(); this.txtext1.Text = model.ext1; this.txtext2.Text = model.ext2; this.txtext3.Text = model.ext3; }