if (dsRiskCategories.Tables[0].Rows.Count > 0)
{
DataRow dr = dsRiskCategories.Tables[0].NewRow();
dr["CategoryId"] = "0";
dr["CategoryName"] = "Select Risk Category";
dsRiskCategories.Tables[0].Rows.InsertAt(dr, 0);
}
ddlCategory.DataSource = dsRiskCategories;
ddlCategory.DataTextField = "CategoryName";
ddlCategory.DataValueField = "CategoryId";
ddlCategory.DataBind();
{
DataRow dr = dsRiskCategories.Tables[0].NewRow();
dr["CategoryId"] = "0";
dr["CategoryName"] = "Select Risk Category";
dsRiskCategories.Tables[0].Rows.InsertAt(dr, 0);
}
ddlCategory.DataSource = dsRiskCategories;
ddlCategory.DataTextField = "CategoryName";
ddlCategory.DataValueField = "CategoryId";
ddlCategory.DataBind();
No comments:
Post a Comment