protected void DropDownList_Year_SelectedIndexChanged(object sender, EventArgs e) { //new year....7 Encode en = new Encode(); SqlDataSource_cses.SelectCommand = GetSQLCseString(DropDownList_Year.SelectedValue); SqlDataSource_cses.ConnectionString = en.GetDbConnection(); SqlDataSource_cses.DataBind(); DropDownList_Course.DataTextField = "CSE"; DropDownList_Course.DataValueField = "ID"; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TextBox_Date.Text = DateTime.Now.ToString("dd/MM/yyyy"); //TextBox_Date.Text ="01/02/2014"; GetMasterValues(); Encode en = new Encode(); SqlDataSource_cses.SelectCommand = GetSQLCseString(DropDownList_Year.SelectedValue); SqlDataSource_cses.ConnectionString = en.GetDbConnection(); SqlDataSource_cses.DataBind(); DropDownList_Course.DataTextField = "CSE"; DropDownList_Course.DataValueField = "ID"; SqlDataSource_opts.SelectCommand = GetSQLOptString(); SqlDataSource_opts.ConnectionString = en.GetDbConnection(); SqlDataSource_opts.DataBind(); ListBox_Options.DataTextField = "Expr1"; ListBox_Options.DataValueField = "ID"; } }