protected void CourseDropDownList_SelectedIndexChanged(object sender, EventArgs e) { Courses _Course = new Courses(); _Course.Id = Convert.ToInt32(CourseDropDownList.SelectedValue); var successe = _CourseAssigneManager.GetAllCourseDataByCourseCode(_Course.Id); if (successe != null) { txtCourseName.Text = successe.CourseName.ToString(); txtCourseCredit.Text = Convert.ToDecimal(successe.CourseCredit).ToString("0"); } }