I have an ASP.NET datagrid that loads an image. I would like to load
one image if the value in my SQL table is true and another if it is
false. Here is my code.
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Sea rch.aspx.vb" Inherits="PROJE CT.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="VBScri pt">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:DataGrid id="MyGrid" style="Z-INDEX: 101; LEFT: 0px; POSITION:
absolute; TOP: 0px" runat="server"
BorderColor="#D EBA84" BorderStyle="No ne" BorderWidth="1p x"
BackColor="#DEB A84" CellPadding="3"
AutoGenerateCol umns="False" CellSpacing="2" >
<SelectedItemSt yle Font-Bold="True" ForeColor="Whit e"
BackColor="#738 A9C"></SelectedItemSty le>
<ItemStyle ForeColor="#8C4 510" BackColor="#FFF 7E7"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Whit e"
BackColor="#A55 129"></HeaderStyle>
<FooterStyle ForeColor="#8C4 510"
BackColor="#F7D FB5"></FooterStyle>
<Columns>
</asp:BoundColumn >
<asp:BoundColum n DataField="City " ReadOnly="True" HeaderText="Cit y">
<ItemStyle Width="150px"></ItemStyle>
</asp:BoundColumn >
<asp:TemplateCo lumn HeaderText="Che ck or X">
<ItemTemplate >
<img src='\Check.gif '>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
<PagerStyle HorizontalAlign ="Center" ForeColor="#8C4 510"
Mode="NumericPa ges"></PagerStyle>
</asp:DataGrid>
</form>
</body>
</HTML>
I want to show the 'Check.gif' if an SQL table value is True or
'x.gif' if it is false.
Thaks for any help, This ASP.NET is kicking my butt.