473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Datalist Formatting Strangeness

Joe
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%# DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%# DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe
Nov 17 '05 #1
6 2493
DataList renders all it's items in a table. That means in additional to the
table you have, there another one where everythihng actually is (check the
HTML rendered).

If you don't want the control to do this table type formatting for you, try
a Repeater control. I believe this just repeats the template for each
element exactly, without placing them all in a table for you.

"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe

Nov 17 '05 #2
Joe
Thanks Marina,

Actually I did have a look at the html output in the interim and discovered
the surrounding table myself - it seems to be a little flakey in the way
it's implemented as it puts an extra blank cell at the end of each item
which is causing the gap.

I considered using the repeater and it would be fine in this case but there
will be other instances where I will want to do sorting and editing and I
believe that's a lot of work with a repeater control - hmmmm, it's friday, I
don't like the sound of that.

I also considered the datagrid to achieve the formatting I want I would
loose my alternating item template and I also want to stick with CSS - not
the style properties exposed by all of these controls.

I suspect that I could find a solution if I were a little more adept with
CSS and tables as there is a cssclass property - hmmmm, I'll have to think
about that one....

In the meantime if anyone else has encountered this issue (and I can't
believe nobody but me has) I'd be grateful for some direction.

Joe

"Marina" <mz*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
DataList renders all it's items in a table. That means in additional to the table you have, there another one where everythihng actually is (check the
HTML rendered).

If you don't want the control to do this table type formatting for you, try a Repeater control. I believe this just repeats the template for each
element exactly, without placing them all in a table for you.

"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%#

DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading"> Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%#

DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading"> Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe


Nov 17 '05 #3
Joe
Actually, just found a way to hide it with CSS - that will do for now -
onward and downward....
"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe

Nov 17 '05 #4
DataList renders all it's items in a table. That means in additional to the
table you have, there another one where everythihng actually is (check the
HTML rendered).

If you don't want the control to do this table type formatting for you, try
a Repeater control. I believe this just repeats the template for each
element exactly, without placing them all in a table for you.

"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe

Nov 17 '05 #5
Joe
Thanks Marina,

Actually I did have a look at the html output in the interim and discovered
the surrounding table myself - it seems to be a little flakey in the way
it's implemented as it puts an extra blank cell at the end of each item
which is causing the gap.

I considered using the repeater and it would be fine in this case but there
will be other instances where I will want to do sorting and editing and I
believe that's a lot of work with a repeater control - hmmmm, it's friday, I
don't like the sound of that.

I also considered the datagrid to achieve the formatting I want I would
loose my alternating item template and I also want to stick with CSS - not
the style properties exposed by all of these controls.

I suspect that I could find a solution if I were a little more adept with
CSS and tables as there is a cssclass property - hmmmm, I'll have to think
about that one....

In the meantime if anyone else has encountered this issue (and I can't
believe nobody but me has) I'd be grateful for some direction.

Joe

"Marina" <mz*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
DataList renders all it's items in a table. That means in additional to the table you have, there another one where everythihng actually is (check the
HTML rendered).

If you don't want the control to do this table type formatting for you, try a Repeater control. I believe this just repeats the template for each
element exactly, without placing them all in a table for you.

"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%#

DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading"> Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%#

DataBinder.Eval(Container.DataItem,
"firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading"> Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe


Nov 17 '05 #6
Joe
Actually, just found a way to hide it with CSS - that will do for now -
onward and downward....
"Joe" <in**@hyper-typer.com> wrote in message
news:eF**************@TK2MSFTNGP12.phx.gbl...
Hey,

Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.

<asp:datalist id="asplistDL" BorderStyle="None" RepeatLayout="table"
cellspacing="0" cellpadding="0" runat="server" horizontalalign="center"
width="100%" borderwidth="0">
<headertemplate>
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedinheader">
Administrator</th>
<th height="100%" class="loggedinheader">
Email</th>
<th class="loggedinheader">
Phone</th>
<th class="loggedinheader">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate>
<tr>
<td valign="top" height="100%"
class="sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td valign="top" height="100%"
class="alt_sitesum">
<%# DataBinder.Eval(Container.DataItem, "firstname")%> <%# DataBinder.Eval(Container.DataItem, "Surname")%>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<a href="mailto:<%#
DataBinder.Eval(Container.DataItem, "email")%>"> <%#
DataBinder.Eval(Container.DataItem, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<table>
<tr>
<td class="paragraph_heading">
Day Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "day_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading">
Evening Phone:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "eve_phone")%>
</td>
</tr>
<tr>
<td class="paragraph_heading"> Mobile:
</td>
<td class="paragraph_text">
<%#
DataBinder.Eval(Container.DataItem, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_sitesum">
<%#
cusCls.webdingit(cusCls.yesno(DataBinder.Eval(Cont ainer.DataItem,
"active")))
%>
</td>
<td align="center" class="alt_sitesum">
<a href="adminupdate.aspx?uid=<%#
DataBinder.Eval(Container.DataItem, "user_id")%>">View/Update</a></td>
</tr>
</AlternatingItemTemplate>
<footertemplate>
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Leo Duran | last post by:
Hi, I am working on an app right now that makes extensive use of the DataList control. I chose the DataList because I need to do multi row formatting. I am using it like so.
2
by: Moe Sizlak | last post by:
Hi There, I am wanting to format a datalist into columns, so do I need to use a table rows & columns? or can I use templates and a property at the top of the list itself ? It seems that when I...
3
by: Clint | last post by:
Hi, I am trying to implement the custom paging in the datalist in this format: << Prev 1,2,3,4,5 Next >>. Does anyone knows how to do this. Thanks in advance. Clint
2
by: IGotYourDotNet | last post by:
Can anyone tell me how to find a table within a datalist? I can find the labels and textboxes in the dl and change the formatting based on the data, but I can't find the table in the DL. Can anyone...
0
by: craigkenisston | last post by:
Datalist formatting through CSS : impossible ? Hi, I have several hours struggling with DataList removing all the autoformat formatting. Now, the format is clean and try to use "CssClass" to...
0
by: Luis Esteban Valencia Muñoz | last post by:
I have a DataList, which looks a bit like this: <asp:DataList id="dlstCheeseType" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" ShowHeader="False" ShowFooter="False"...
2
by: yer darn tootin | last post by:
Here's the scenario: I have a javascript function taking the contents of a datalist ( content from a SQL db ) and opening it in a new window to allow the user to print. The pop-up window...
1
by: | last post by:
I have a label control that I've embedded in a datalist template. I will be binding data to that label. I want to run a string formatting function on the database text before it is injected into...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.