HighTechTalks DotNet Forums  

too much spaces with Repeater control

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss too much spaces with Repeater control in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Bart
 
Posts: n/a

Default too much spaces with Repeater control - 05-31-2007 , 01:56 PM






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>




Reply With Quote
  #2  
Old   
CaffieneRush@gmail.com
 
Posts: n/a

Default Re: too much spaces with Repeater control - 06-01-2007 , 08:37 AM






Try removing the very first opening <tr> after <table>.

On 31 May, 18:56, "Bart" <b@s> wrote:
Quote:
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



Reply With Quote
  #3  
Old   
MasterGaurav \(www.edujini-labs.com\)
 
Posts: n/a

Default Re: too much spaces with Repeater control - 06-05-2007 , 09:09 AM



Quote:
form id="form1" runat="server"
table width=100%><tr
asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1"
ItemTemplate
tr

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
-----------------------------------------




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.