I have a form that onload is taking a datareader and binding to a checkboxlist. The output will look like the following.
Product1 (Store1)
Product2 (Store1)
Product3 ( )
Product4 (Store2)
Product5 (Store1)
Product6 ( )
I am wondering if there is a way I can make the ( ) section only filled with a color. In classic asp we could say if Instr '( )' then
<b style='background-color:yellow;'> </b>
end if
Note, I really do not want to color it if a value (Store1) is present. Just makes it easier to read.
Any ideas?
my code is something like so:
VB Code:
Dim conPubs as SqlConnection Dim cmdProducts as SqlCommand Dim dtrAddProducts as SqlDataReader conPubs = New SqlConnection(System.Config.....("CONN")) cmdProducts = New SqlCommand("SELECT fullmodel, product_id FROM table", conPubs) conPubs.Open() dtrAddProducts = cmdProducts.ExecuteReader() chkProducts.DataSource = dtrAllProducts chkProducts.DataTextField = "fullmodel" chkProducts.DataValueField = "product_id" chkProducts.DataBind() dtrAddProducts.Close()
form section
Code:... <td> <asp:checkboxlist id="chkProducts" runat="Server" textalignment="left"></asp:checkboxlist> </td> ...


Reply With Quote