I
info
I have a datalist with ItemTemplate as a part of my control, however
every time the ItemTemplate repeats, it inserts a <br>. How do I get it
to not insert a <br>? I need it to be a DataList as opposed to a
repeater so that I have access to the OnUpdateCommand.
<aspanel id="DetailsPanel" runat="server">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR><TD><DIV align="center"><FONT color="black"
size="2"><B>Item</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black" size="2"><B>Unit
Price</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black"
size="2"><B>Quantity</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black" size="2"><B>Subtotal
</B></FONT></DIV></TD>
</TR>
<aspataList id="ShoppingCartList" runat="server"
OnUpdateCommand="ShoppingCartList_Update"
OnItemDataBound="ShoppingCartList_ItemDataBound"
DataKeyField="Quantity" RepeatLayout="Flow"
OnDeleteCommand="ShoppingCartList_Delete">
<ItemTemplate><tr>
<td>
<asp:Label ID="a" Runat=server Visible=False Enabled=False
Text='<%# DataBinder.Eval(Container.DataItem, "a") %>' />
<div align="left">
<font size="2">
<asp:Label ID=b Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "b") %>' Visible=False />
<asp:Label ID="c" Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "c") %>' />
</font>
</div>
</td>
<td>
<div align="center">
<font size="2">
<asp:Label ID="d" Runat="server" text='<%#
DataBinder.Eval(Container.DataItem, "d") %>' />
</font>
</div>
</td>
<td>
<div align="center">
<asp:TextBox ID="e" Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "e") %>' width="40px" />
<br>
<font size="1" color="#009966">
<asp:LinkButton ID="f" Runat="server" Text="Update f"
CommandName="update" />
<br>
</font>
<font size="1" color="red">
<asp:LinkButton ID="g" Runat="server" Text="g"
CommandName="delete" />
</font>
</div>
</td>
<td>
<div align="center">
<font size="2">
<asp:Label ID="h" Runat="server"
text='<%#DataBinder.Eval(Container.DataItem, "h") %>' />
</font>
</div>
</td>
</tr>
</ItemTemplate></aspataList>
every time the ItemTemplate repeats, it inserts a <br>. How do I get it
to not insert a <br>? I need it to be a DataList as opposed to a
repeater so that I have access to the OnUpdateCommand.
<aspanel id="DetailsPanel" runat="server">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR><TD><DIV align="center"><FONT color="black"
size="2"><B>Item</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black" size="2"><B>Unit
Price</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black"
size="2"><B>Quantity</B></FONT></DIV></TD>
<TD><DIV align="center"><FONT color="black" size="2"><B>Subtotal
</B></FONT></DIV></TD>
</TR>
<aspataList id="ShoppingCartList" runat="server"
OnUpdateCommand="ShoppingCartList_Update"
OnItemDataBound="ShoppingCartList_ItemDataBound"
DataKeyField="Quantity" RepeatLayout="Flow"
OnDeleteCommand="ShoppingCartList_Delete">
<ItemTemplate><tr>
<td>
<asp:Label ID="a" Runat=server Visible=False Enabled=False
Text='<%# DataBinder.Eval(Container.DataItem, "a") %>' />
<div align="left">
<font size="2">
<asp:Label ID=b Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "b") %>' Visible=False />
<asp:Label ID="c" Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "c") %>' />
</font>
</div>
</td>
<td>
<div align="center">
<font size="2">
<asp:Label ID="d" Runat="server" text='<%#
DataBinder.Eval(Container.DataItem, "d") %>' />
</font>
</div>
</td>
<td>
<div align="center">
<asp:TextBox ID="e" Runat=server Text='<%#
DataBinder.Eval(Container.DataItem, "e") %>' width="40px" />
<br>
<font size="1" color="#009966">
<asp:LinkButton ID="f" Runat="server" Text="Update f"
CommandName="update" />
<br>
</font>
<font size="1" color="red">
<asp:LinkButton ID="g" Runat="server" Text="g"
CommandName="delete" />
</font>
</div>
</td>
<td>
<div align="center">
<font size="2">
<asp:Label ID="h" Runat="server"
text='<%#DataBinder.Eval(Container.DataItem, "h") %>' />
</font>
</div>
</td>
</tr>
</ItemTemplate></aspataList>