R
Rob Rogers
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="Search.aspx.vb" Inherits="PROJECT.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="VBScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<aspataGrid id="MyGrid" style="Z-INDEX: 101; LEFT: 0px; POSITION:
absolute; TOP: 0px" runat="server"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
BackColor="#DEBA84" CellPadding="3"
AutoGenerateColumns="False" CellSpacing="2">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#738A9C"></SelectedItemStyle>
<ItemStyle ForeColor="#8C4510" BackColor="#FFF7E7"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#A55129"></HeaderStyle>
<FooterStyle ForeColor="#8C4510"
BackColor="#F7DFB5"></FooterStyle>
<Columns>
</asp:BoundColumn>
<asp:BoundColumn DataField="City" ReadOnly="True" HeaderText="City">
<ItemStyle Width="150px"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="Check or X">
<ItemTemplate>
<img src='\Check.gif'>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="#8C4510"
Mode="NumericPages"></PagerStyle>
</aspataGrid>
</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.
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="Search.aspx.vb" Inherits="PROJECT.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="VBScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<aspataGrid id="MyGrid" style="Z-INDEX: 101; LEFT: 0px; POSITION:
absolute; TOP: 0px" runat="server"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
BackColor="#DEBA84" CellPadding="3"
AutoGenerateColumns="False" CellSpacing="2">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#738A9C"></SelectedItemStyle>
<ItemStyle ForeColor="#8C4510" BackColor="#FFF7E7"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#A55129"></HeaderStyle>
<FooterStyle ForeColor="#8C4510"
BackColor="#F7DFB5"></FooterStyle>
<Columns>
</asp:BoundColumn>
<asp:BoundColumn DataField="City" ReadOnly="True" HeaderText="City">
<ItemStyle Width="150px"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="Check or X">
<ItemTemplate>
<img src='\Check.gif'>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="#8C4510"
Mode="NumericPages"></PagerStyle>
</aspataGrid>
</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.