protected void Page_Load(object sender, EventArgs e) { btnAdd.Attributes.Add("onclick", "clcontent();"); changeLinks(); getCompanyName(); if (!IsPostBack) { dropZip.bindZipCheckBox(lisZip); dropZip.bindLocationDropdown(drpLocation); for (int intZip = 0; intZip < lisZip.Items.Count; intZip++) { lisZip.Items[intZip].Selected = true; } lblMsg.Text = ""; BindCheck(); } }
protected void Page_Load(object sender, EventArgs e) { btnAdd.Attributes.Add("onclick", "clcontent();"); changeLinks(); getCompanyName(); Label1.Text = ""; if (!IsPostBack) { strDeliverydateID = Convert.ToString(Request.QueryString["DeliveryDateID"]); strDate = Convert.ToString(Request.QueryString["date"]); txtDeliveryDate.Text = Convert.ToDateTime(strDate).ToShortDateString(); dropZip.bindZipCheckBox(lisZip); DataSet dsDeliverytime = dbAddInfo.SelectDeliveryDatezipAllDetails(strDeliverydateID); if (dsDeliverytime.Tables[0].Rows.Count > 0) { foreach (DataRow dtrow in dsDeliverytime.Tables[0].Rows) { string zipid = Convert.ToString(dtrow["zipcode_id"]); for (int intZip = 0; intZip < lisZip.Items.Count; intZip++) { if (zipid == lisZip.Items[intZip].Value) { lisZip.Items[intZip].Selected = true; } } // lisZip.Items[Convert.ToInt32(zipid)].Selected = true; // lisZip.Items.SelectedValue = zipid; } } dropZip.bindLocationDropdown(drpLocation); lblMsg.Text = ""; Label1.Text = ""; BindCheck(); } }