473,811 Members | 3,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%# DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%# DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<footertemplate >
</table>
</footertemplate>

</asp:datalist>

Thanks
Joe
Nov 17 '05 #1
6 2511
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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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*******@hotm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%#

DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading"> Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%#

DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading"> Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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*******@hotm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%#

DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading"> Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%#

DataBinder.Eval (Container.Data Item,
"firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading"> Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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******** ******@TK2MSFTN GP12.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="No ne" RepeatLayout="t able"
cellspacing="0" cellpadding="0" runat="server" horizontalalign ="center"
width="100%" borderwidth="0" >
<headertemplate >
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<th class="loggedin header">
Administrator</th>
<th height="100%" class="loggedin header">
Email</th>
<th class="loggedin header">
Phone</th>
<th class="loggedin header">
Active</th>
<th></th>
</tr>
</headertemplate>
<ItemTemplate >
<tr>
<td valign="top" height="100%"
class="sitesum" >
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="sitesum" >
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="sitesum" >
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="sitesum" >
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="sitesum" >
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a>
</tr>
</ItemTemplate>
<AlternatingIte mTemplate>
<tr>
<td valign="top" height="100%"
class="alt_site sum">
<%# DataBinder.Eval (Container.Data Item, "firstname" )%> <%# DataBinder.Eval (Container.Data Item, "Surname")% >
</td>
<td height="100%" valign="top"
class="alt_site sum">
<a href="mailto:<% #
DataBinder.Eval (Container.Data Item, "email")%>" > <%#
DataBinder.Eval (Container.Data Item, "email")%> </a>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<table>
<tr>
<td class="paragrap h_heading">
Day Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "day_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading">
Evening Phone:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "eve_phone" )%>
</td>
</tr>
<tr>
<td class="paragrap h_heading"> Mobile:
</td>
<td class="paragrap h_text">
<%#
DataBinder.Eval (Container.Data Item, "mobile")%>
</td>
</tr>
</table>
</td>
<td height="100%" valign="top"
class="alt_site sum">
<%#
cusCls.webdingi t(cusCls.yesno( DataBinder.Eval (Container.Data Item,
"active")))
%>
</td>
<td align="center" class="alt_site sum">
<a href="adminupda te.aspx?uid=<%#
DataBinder.Eval (Container.Data Item, "user_id")%>">V iew/Update</a></td>
</tr>
</AlternatingItem Template>
<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
5237
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
1773
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 try to format the datalist I can't get it to look like a normal html table. Moe row1 = col1 col2 col3 col4 col 5
3
5063
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
325
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 point me to a code sniippet or something on finding a table in the datalist?
0
1087
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 specify the formating in a CSS, but since the DataList result is a table, it seems it just don't take exactly the format I want ... or I am doing it the wrong way.
0
1009
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" ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%" Width="100%"> <ItemTemplate> <asp:RadioButton ID="cheeseChoice" Text='<%# Container.DataItem.Row("CheeseName") %>' Runat="server" GroupName="cheeseGroup"/>
2
2965
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 successfully applies the formatting from the datalist ( ie the dl's <ItemStyle> properties ), but ignores any of the formatting 'hard coded' into the SQL data being returned, eg things like <div class="newpara">. This in-table formatting appears OK on the...
1
3897
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 the datalist. When I try to do this, I get a "... does not exist in the current context. I need to know how to target the control. If I were writing Flash actionscript, it would be something like
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.