protected void Page_Load(object sender, EventArgs e) { RatingManager ratingManager = new RatingManager(); RatingDropDownList.DataValueField = "Id"; RatingDropDownList.DataTextField = "Description"; RatingDropDownList.DataSource = ratingManager.GetAll(); RatingDropDownList.DataBind(); }
private void DoDataBind() { RatingManager manager = new RatingManager(); RatingDropDownList.DataValueField = "Id"; RatingDropDownList.DataTextField = "Description"; RatingDropDownList.DataSource = manager.GetAll(); RatingDropDownList.DataBind(); UpdateTextBoxes(); manager.Dispose(); }
protected void Page_Load(object sender, EventArgs e) { BALObj = new BAL(); if (!IsPostBack) { RatingDropDownList.DataSource = BALObj.GetRatings(); RatingDropDownList.DataTextField = "RatingName"; RatingDropDownList.DataValueField = "RatingId"; RatingDropDownList.DataBind(); } }