all groups > asp.net building controls > may 2007 >
You're in the

asp.net building controls

group:

too much spaces with Repeater control


too much spaces with Repeater control Bart
5/31/2007 7:56:58 PM
asp.net building controls:
Hi,

i use a repeater control for reading data from a database.
I have no error, but the table for showing the records defined in this code,
starts at the middle of the page. I noticed that the unasked space above the
table matchs the number of records in the table, as if the data were read
twice ...

Thanks for help
Bart

Here my code:

<form id="form1" runat="server">
<table width=100%><tr>
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<tr>
<td><asp:Label ID="Label1" runat="server" Text='<%#
Eval("name") %>'></asp:Label><br /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</form>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [name] FROM [logo]"></asp:SqlDataSource>


Re: too much spaces with Repeater control
6/1/2007 5:37:55 AM
Try removing the very first opening <tr> after <table>.

[quoted text, click to view]

Re: too much spaces with Repeater control MasterGaurav (www.edujini-labs.com)
6/5/2007 6:39:40 PM
[quoted text, click to view]


There seems to be an HTML issue here... You have a <tr> inside <tr>

Remove the first "<tr>"!

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------

AddThis Social Bookmark Button