2013年1月3日
摘要: //遍历下拉列表,如果下拉列表有与数据库存放对应的值就选中,没有就添加并选中 for (int i = 0; i < housetypeDDL.Items.Count; i++) { if (housetypeDDL.Items[i].Value == housetype) {housetypeDDL.SelectedIndex = i; break; } else { index++;} } if (index == housetypeDDL.Items.Count) { ListItem li = new ListItem(housetype, housetype); housety 阅读全文
posted @ 2013-01-03 21:17 DearBug 阅读(251) 评论(0) 推荐(0) 编辑
摘要: protected void Page_Load(object sender, EventArgs e) { Int32 id = Convert.ToInt32(Session["houseID"].ToString()); DataClassesDataContext dcdc = new DataClassesDataContext(); b_house BHouse = dcdc.b_house.Single(p => p.ID == id);//获取需要更新的房源信息 xnameTXB.Text = BHouse.xname; } 阅读全文
posted @ 2013-01-03 16:57 DearBug 阅读(400) 评论(0) 推荐(0) 编辑