L
Luis Esteban Valencia
I have a datalist. This is the code.
I have 2linkbuttons and it depends of a field to show one or the other.
The IF clause is OK, but its showing me the links in BLACK not in blue! and
they are like plain text not links.
aspataList id="dlsolicitud" runat="server" Width="800px"
GridLines="Both" CellPadding="4" BorderColor="#CC9966"
BackColor="White" BorderStyle="None" BorderWidth="1px">
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<HeaderTemplate>
<TABLE id="Table2" runat="server" borderColor="#000000"
cellSpacing="1" cellPadding="1"
width="800" border="1" runat="server">
<TR>
<TD width="30">Id</TD>
<TD width="200">Nombre</TD>
<TD width="50">Prioridad</TD>
<TD width="500">Diagnostico</TD>
<TD width="50">Estadl</TD>
<TD width="20"></TD>
</TR>
</TABLE>
</HeaderTemplate>
<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
<ItemTemplate>
<TABLE id="Table2" borderColor="#000000" cellSpacing="1"
cellPadding="1" width="800" border="1"
runat="server">
<TR>
<TD width="30"><%# DataBinder.Eval(Container,
"DataItem.idserviciomantenimiento") %></TD>
<TD width="200"><%# DataBinder.Eval(Container,
"DataItem.nombre") %></TD>
<TD width="50"><%# DataBinder.Eval(Container,
"DataItem.prioridad") %></TD>
<TD width="500"><%# DataBinder.Eval(Container,
"DataItem.diagnostico") %></TD>
<TD width="50"><%# DataBinder.Eval(Container, "DataItem.estado")
%></TD>
<TD width="20">
<asp:linkbutton Runat="server" ID="ejecutar" visible='<%#
iif(DataBinder.Eval(Container, "DataItem.Estado")="ENVIADO",1,0) %>'
CommandName="Ejecutar">Ejecutar</asp:linkbutton>
<asp:linkbutton Runat="server" ID="finalizar" visible='<%#
iif(DataBinder.Eval(Container, "DataItem.Estado")="EN EJECUCION",1,0) %>'
CommandName="Finalizar">Finalizar</asp:linkbutton>
</TD>
</TR>
</TABLE>
</ItemTemplate>
<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC"
BackColor="#990000"></HeaderStyle>
</aspataList>
I have 2linkbuttons and it depends of a field to show one or the other.
The IF clause is OK, but its showing me the links in BLACK not in blue! and
they are like plain text not links.
aspataList id="dlsolicitud" runat="server" Width="800px"
GridLines="Both" CellPadding="4" BorderColor="#CC9966"
BackColor="White" BorderStyle="None" BorderWidth="1px">
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<HeaderTemplate>
<TABLE id="Table2" runat="server" borderColor="#000000"
cellSpacing="1" cellPadding="1"
width="800" border="1" runat="server">
<TR>
<TD width="30">Id</TD>
<TD width="200">Nombre</TD>
<TD width="50">Prioridad</TD>
<TD width="500">Diagnostico</TD>
<TD width="50">Estadl</TD>
<TD width="20"></TD>
</TR>
</TABLE>
</HeaderTemplate>
<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
<ItemTemplate>
<TABLE id="Table2" borderColor="#000000" cellSpacing="1"
cellPadding="1" width="800" border="1"
runat="server">
<TR>
<TD width="30"><%# DataBinder.Eval(Container,
"DataItem.idserviciomantenimiento") %></TD>
<TD width="200"><%# DataBinder.Eval(Container,
"DataItem.nombre") %></TD>
<TD width="50"><%# DataBinder.Eval(Container,
"DataItem.prioridad") %></TD>
<TD width="500"><%# DataBinder.Eval(Container,
"DataItem.diagnostico") %></TD>
<TD width="50"><%# DataBinder.Eval(Container, "DataItem.estado")
%></TD>
<TD width="20">
<asp:linkbutton Runat="server" ID="ejecutar" visible='<%#
iif(DataBinder.Eval(Container, "DataItem.Estado")="ENVIADO",1,0) %>'
CommandName="Ejecutar">Ejecutar</asp:linkbutton>
<asp:linkbutton Runat="server" ID="finalizar" visible='<%#
iif(DataBinder.Eval(Container, "DataItem.Estado")="EN EJECUCION",1,0) %>'
CommandName="Finalizar">Finalizar</asp:linkbutton>
</TD>
</TR>
</TABLE>
</ItemTemplate>
<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC"
BackColor="#990000"></HeaderStyle>
</aspataList>