for (int count = 0; count < ds.Tables[0].Rows.Count; count++)
{
strBrandname += ";" + Convert.ToString(ds.Tables[0].Rows[count]["BRANDNAME"]);
strBrandid += ";" + Convert.ToString(ds.Tables[0].Rows[count]["BRANDID"]);
}
strBrandname = strBrandname.TrimStart(';');
strBrandid = strBrandid.TrimStart(';');
strTotalBrand = strBrandname + "-" + strBrandid;
string[] brand = Regex.Split(strBrandname, ";");
string[] BrandID = Regex.Split(strBrandid, ";");
DrpBrand.DataSource = "";
DrpBrand.DataBind();
for (int i = 0; i < brand.Length; i++)
{
DrpBrand.Items.Add(new ListItem(brand[i],BrandID[i]));
}
{
strBrandname += ";" + Convert.ToString(ds.Tables[0].Rows[count]["BRANDNAME"]);
strBrandid += ";" + Convert.ToString(ds.Tables[0].Rows[count]["BRANDID"]);
}
strBrandname = strBrandname.TrimStart(';');
strBrandid = strBrandid.TrimStart(';');
strTotalBrand = strBrandname + "-" + strBrandid;
string[] brand = Regex.Split(strBrandname, ";");
string[] BrandID = Regex.Split(strBrandid, ";");
DrpBrand.DataSource = "";
DrpBrand.DataBind();
for (int i = 0; i < brand.Length; i++)
{
DrpBrand.Items.Add(new ListItem(brand[i],BrandID[i]));
}
No comments:
Post a Comment