void LoadPost() { try { List <ATTPost> lstPost; lstPost = BLLPost.GetPost(null); lstPost.Insert(0, new ATTPost(0, "Select Post")); Session["Post"] = lstPost; this.ddlPost.DataSource = lstPost; this.ddlPost.DataTextField = "PostName"; //ATTPost this.ddlPost.DataValueField = "PostID"; this.ddlPost.SelectedIndex = 0; this.ddlPost.DataBind(); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }
void GetPost() { try { List <ATTPost> PostList = BLLPost.GetPost(null); Session["Post"] = PostList; lstPost.DataSource = PostList; lstPost.DataTextField = "PostName"; lstPost.DataValueField = "PostID"; lstPost.DataBind(); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); return; } }