private void InitData(int id) { Ads model = bll.GetModel(id); if (model != null) { txtOrderby.Text = model.orderid + ""; txtTitle.Text = model.title; txtLinkUrl.Text = model.linkUrl; ddlPicArea.SelectedValue = model.typeid + ""; if (!string.IsNullOrEmpty(model.linkImage)) { hdfImgPath.Value = model.linkImage; newsImg.Src = "../../uploads_thum/" + model.linkImage; newsImg.Attributes.CssStyle.Add("display", "block"); } ; hdfPid.Value = id + ""; } }