protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString.Count > 0) { string strstno = Request.QueryString["stno"].ToString(); Store store = storeBLL.GetSingleByno(strstno); stno.Value = strstno; address.Value = store.address; telephone.Value = store.telephone; capacity.Value = store.capacity.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { string stno = Request.QueryString["stno"].ToString(); var store = bllsto.GetSingleByno(stno); txtstno.Value = store.stno; address.Value = store.address; telephone.Value = store.telephone; capacity.Value = store.capacity.ToString(); } catch (Exception ex) { Response.Redirect("StoreList.aspx"); } } }