title: how to bind image in Listbox with data
body: <p>Hi all i have one problem in list box in which i would like to bind image with data on condition . Like when user is active i like to display different image , when he is not working like to display different image . this time i am displaying name in different color on his status like not working then in Red color, working with green color.  </p>
  
  <p>My html is </p>
  
  <pre><code> &lt;asp:ListBox ID="ddlDriver" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="ddlDriver_SelectedIndexChanged"
                                                  runat="server"  BackColor="White" Height="380px"&gt;
  
  
  
                                          &lt;/asp:ListBox&gt;
  </code></pre>
  
  <p>Code :</p>
  
  <pre><code>   if (_driv.DriverStatus == 1)
          {
              ddlDriver.Items[i].Text = ddlDriver.Items[i].Value + "-" + ddlDriver.Items[i].Text + " " + OrderTota;
              ddlDriver.Items[i].Attributes.CssStyle.Add(HtmlTextWriterStyle.Color, "red");
  
          }
          else if (_driv.DriverStatus == 2)
          {
              ddlDriver.Items[i].Text = ddlDriver.Items[i].Value + "-" + ddlDriver.Items[i].Text + " " + OrderTota;
              ddlDriver.Items[i].Attributes.CssStyle.Add(HtmlTextWriterStyle.Color, "green");
          }
  </code></pre>
  
  <p>please help me about this issue.</p>