protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         rptrstudent.DataSource = teacher_tbldao.getAllTeachers().Tables[0];
         rptrstudent.DataBind();
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownList1.DataSource     = course_tbldao.getallCourse();
                DropDownList1.DataTextField  = "course_id";
                DropDownList1.DataValueField = "course_id";
                DropDownList1.DataBind();
                DropDownList1.Items.Insert(0, "---Select---");

                DropDownList2.DataSource     = teacher_tbldao.getAllTeachers();
                DropDownList2.DataTextField  = "teacher_id";
                DropDownList2.DataValueField = "teacher_id";
                DropDownList2.DataBind();
                DropDownList2.Items.Insert(0, "---Select---");
            }
        }