Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 18, 2008 10:01 PM by oner_
Member
44 Points
18 Posts
Oct 17, 2006 12:44 PM|LINK
Hi,
Currently the DataList control I'm using is inserting link breaks between each item, even though I've specified no such thing.
E.g.
<asp:DataList ID="DataList1" runat="server" RepeatLayout="Flow"> <HeaderTemplate> <ul> </HeaderTemplate> <ItemTemplate> <li> <asp:Label ID="DateTimeLabel" runat="server" Text='<%# Eval("DateTime") %>'></asp:Label>: <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>'></asp:Label> </li> </ItemTemplate> <FooterTemplate> </ul> </FooterTemplate> </asp:DataList>
However the output I get is:
<span id="JobsGridView_ctl05_ParametersDataList"> <span> <ul> </span> <br /> <span> <li> <span id="JobsGridView_ctl05_ParametersDataList_ctl01_NameLabel">GLLONDON </span>: <span id="JobsGridView_ctl05_ParametersDataList_ctl01_ParamValueLabel">LON </span> </li> </span> <br /> <span> <li> <span id="JobsGridView_ctl05_ParametersDataList_ctl02_NameLabel">COBDate </span>: <span id="JobsGridView_ctl05_ParametersDataList_ctl02_ParamValueLabel">20060124 </span> </li> </span> <br /> <span> </ul> </span> </span> Notice all the unwanted line breaks <br /> (and also span elements but they don't bother me).How do I get the control to stop using the break elements? Thanks, Weiran.
<span id="JobsGridView_ctl05_ParametersDataList"> <span> <ul> </span> <br /> <span> <li> <span id="JobsGridView_ctl05_ParametersDataList_ctl01_NameLabel">GLLONDON </span>: <span id="JobsGridView_ctl05_ParametersDataList_ctl01_ParamValueLabel">LON </span> </li> </span> <br /> <span> <li> <span id="JobsGridView_ctl05_ParametersDataList_ctl02_NameLabel">COBDate </span>: <span id="JobsGridView_ctl05_ParametersDataList_ctl02_ParamValueLabel">20060124 </span> </li> </span> <br /> <span> </ul> </span> </span>
Notice all the unwanted line breaks <br /> (and also span elements but they don't bother me).
How do I get the control to stop using the break elements?
Thanks,
Weiran.
Oct 18, 2006 08:54 AM|LINK
Sorry to bump this, but I've still not found any solutions.
Can anyone help?
2 Points
1 Post
Jun 18, 2008 10:01 PM|LINK
Set RepeatDirection property to Horizontal. Difficult problem, easy answer. :)
weiranz
Member
44 Points
18 Posts
Remove automatic line breaks from DataList
Oct 17, 2006 12:44 PM|LINK
Hi,
Currently the DataList control I'm using is inserting link breaks between each item, even though I've specified no such thing.
E.g.
<asp:DataList ID="DataList1" runat="server" RepeatLayout="Flow"> <HeaderTemplate> <ul> </HeaderTemplate> <ItemTemplate> <li> <asp:Label ID="DateTimeLabel" runat="server" Text='<%# Eval("DateTime") %>'></asp:Label>: <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>'></asp:Label> </li> </ItemTemplate> <FooterTemplate> </ul> </FooterTemplate> </asp:DataList>weiranz
Member
44 Points
18 Posts
Re: Remove automatic line breaks from DataList
Oct 18, 2006 08:54 AM|LINK
Sorry to bump this, but I've still not found any solutions.
Can anyone help?
oner_
Member
2 Points
1 Post
Re: Remove automatic line breaks from DataList
Jun 18, 2008 10:01 PM|LINK
Set RepeatDirection property to Horizontal. Difficult problem, easy answer. :)