protected void ddlESNList_SelectedIndexChanged(object sender, EventArgs e) { if (ddlESNList.SelectedItem.Value != "") { // fill product in dropdownlist ProductEntiry productObj = new ProductEntiry(); BALProduct bproductObj = new BALProduct(); productObj.Productid = 0; productObj.Productname = ddlProductName.SelectedItem.Text; productObj.Mrp = 0.0; productObj.Description = null; productObj.Status = "A"; DataTable dtb = bproductObj.FillProductBAL(productObj); if (dtb.Rows.Count > 0) { txtMrp.Text = Convert.ToString(dtb.Rows[0]["P_MRP"]); txtRatePcs.Text = Convert.ToString(dtb.Rows[0]["P_Sales"]); //ddlESNList.Items.RemoveAt(ddlESNList.SelectedIndex); } else { txtMrp.Text = ""; txtRatePcs.Text = ""; //Message Display string msg = "<script type='text/javascript'>"; msg += " alert('No Item Data Found!!')"; msg += "</script>"; ClientScript.RegisterClientScriptBlock(typeof(Page), "message", msg); } } else { //Message Display string msg = "<script type='text/javascript'>"; msg += " alert('Select Product from the list!!')"; msg += " ClientScript.RegisterClientScriptBlock(typeof(Page), "message", msg); } }
IsPostback
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)