JabbaTheNut
Programmer
I would like to include a column in my data grid that will display a link to "myPage.aspx" if the DataItem value is "new". However, if the DataItem value is not "new" then I want to simply display the DataItem value.
I have tried the following code which does not work.
<asp:TemplateColumn>
<ItemTemplate>
<TABLE>
<TR>
<TD>
<%#
if Container.DataItem("status"
= "new" then
<a href="myPage.aspx">Test</a>
else
Container.DataItem("status"
end if
%>
</TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:TemplateColumn>
What is the proper method to achieve my goal? Game Over, Man!
I have tried the following code which does not work.
<asp:TemplateColumn>
<ItemTemplate>
<TABLE>
<TR>
<TD>
<%#
if Container.DataItem("status"
<a href="myPage.aspx">Test</a>
else
Container.DataItem("status"
end if
%>
</TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:TemplateColumn>
What is the proper method to achieve my goal? Game Over, Man!