too much spaces with Repeater control

Discussion in 'ASP .Net Building Controls' started by Bart, May 31, 2007.

  1. Bart

    Bart Guest

    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>
    Bart, May 31, 2007
    #1
    1. Advertising

  2. Bart

    Guest

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

    On 31 May, 18:56, "Bart" <b@s> wrote:
    > 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>
    , Jun 1, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SB
    Replies:
    0
    Views:
    374
  2. Bart
    Replies:
    2
    Views:
    325
    MasterGaurav \(www.edujini-labs.com\)
    Jun 5, 2007
  3. John B. Matthews
    Replies:
    4
    Views:
    666
    John B. Matthews
    Sep 12, 2008
  4. cpp4ever
    Replies:
    3
    Views:
    369
    Francesco
    Sep 8, 2009
  5. Raymond Schanks
    Replies:
    0
    Views:
    519
    Raymond Schanks
    Apr 11, 2010
Loading...

Share This Page