protected void ddlweek_change(object sender, EventArgs e) { set_buttons(); if (ddlweek.SelectedIndex > 0) { string[] vals = ddlweek.SelectedValue.Split('-'); DataSet ds = Utilities_Licensing.Getweek_days(vals[0], vals[1], ddlemp.SelectedValue); dtls.DataSource = ds; dtls.DataBind(); btnsave.Visible = true; btnapprove.Visible = true; } else { btnsave.Visible = false; btnapprove.Visible = false; dtls.DataSource = null; dtls.DataBind(); } }