protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //default trip type if user do not select anything Session["tripType"] = "One Way"; GetFlightDetails getFlightDetails = new GetFlightDetails(); //bind distinct sources to drop down source listSource.DataSource = getFlightDetails.GetSource(); listSource.DataBind(); //bind distinct travel class to drop down listClass.DataSource = getFlightDetails.GetClass(); listClass.DataBind(); } //disabling dates before current day txtDateOfJourney.Attributes["min"] = DateTime.Now.ToString("yyyy-MM-dd"); txtDateOfReturn.Attributes["min"] = DateTime.Now.ToString("yyyy-MM-dd"); DropDownList1_SelectedIndexChanged(sender, e); }