Hi friends,
am working on asp.net project using c# and sqlserver 2005.
In my project, i have folder with name Images. These images should be displayed in gridview when PageLoads based on CompanyCode.
Suppose If i have companycode with name SecSyst, Beside this column in gridview it should display the logo of this company from images folder.
By the way this is my code.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Bindgridview();
}
}
private void Bindgridview()
{
SqlConnection con = new SqlConnection(_connString);
SqlCommand cmd = new SqlCommand("Select CompanyCode,CompDesc,Compdetails from CompInfo", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GVCompanies.DataSource = ds;
GVCompanies.DataBind();
}
Please can you show me how to display the logo from images folder based on companycode in gridview.
All the company logos are in images folder.
Please help, thanks.