Hi
I have div In my page that in this div I put image control
<div id="DLogos">
<asp:Image ID="imglogo" runat="server" CssClass="ILogos" /> </div>
according to below code
<div id="Dart1_I1" visible='<%# !string.IsNullOrEmpty(Eval("image1").ToString())%>'>
If in database was image it show div and if there wasn't any image it didn't show div but above code is for div that I put in datalist
now I want do some thing like that for Div that I don't put it in datalist I should write code for that in behindecode page but I don't know How I can do it?
behind code
SqlCommand _cmd = new SqlCommand("storeinfo1", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@behcode", data);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())
{
this.Page.Header.Controls.Add(htmlmeta);
Lblbehcode.Text = _dr["name"].ToString();
Image1.ImageUrl = "~/image/behcode/" + _dr["Image_Behcode"].ToString();
lbldescription.Text = _dr["Service"].ToString();
lbladdress.Text = _dr["address"].ToString();
lbltell.Text = _dr["tell"].ToString();
}