protected void ListBoxItems_SelectedIndexChanged(object sender, EventArgs e) { ListBox lisender = (sender as ListBox); if (lisender.ID == "ListBoxItems") { lstboxSecindlist.ClearSelection(); } else { ListBoxItems.ClearSelection(); } if (ListBoxItems.SelectedValue == "nofilter") { txtFilterFrom.Text = ""; txtFilterTo.Text = ""; } if (lstboxSecindlist.SelectedValue == "EqualToToday" || lstboxSecindlist.SelectedValue == "EqualToOrLessThanToday") { txtFilterFrom.Text = DateTime.Now.ToString("dd/MM/yyyy"); } else if (lstboxSecindlist.SelectedValue == "EqualToTomorrow") { txtFilterFrom.Text = DateTime.Now.AddDays(1).ToString("dd/MM/yyyy"); } string strjFunClose = String.Format("HideCustomFilterUserControl()"); ScriptManager.RegisterStartupScript(this, this.GetType(), "close" + this.ID, strjFunClose, true); ApplySearch(); }