Re: A question about Repeater control
Hi Steven,
Thanks for your reply. But your examples do not fit my request. For
example#1, all links are displayed in one row. and example#2, there is only
one link per row. And what I need is 3 links per row.
Any more suggestion?
Thanks
-Vincent
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:m5jH0LuJGHA.3680@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi Vincent,
>
> Welcome to the ASPNET newsgroup.
>
> From your description, you're using the ASP.NET repeater control to
> display
> list of hyperlinks on page. Also, the links' data is retrieved from
> database table and one link per data table row. Currently you're wondering
> how to display them through html table element and each link item in a
> table cell, correct?
>
> If this is the case, I think you can consider use the template in repeater
> control to declare the html table content. Since you're wantting to
> display
> the link items in html table cell(not row), we need to bread each <td>
> content into ItemTemplate. e.g:
> =================
> <asp:Repeater ID="Repeater1" runat="server">
> <HeaderTemplate><table><tr></HeaderTemplate>
>
> <ItemTemplate>
> <td>
> <a href="<%# xxx %>" ......><%# xxx %></a>
> </td>
> </ItemTemplate>
>
> <FooterTemplate></tr></table></FooterTemplate>
> </asp:Repeater>
> ===================
>
> This will help display each data item in an html table
> cell(<td>...</td>).And the links are displayed horizontally.
>
> If we want to display them vertically, just change the template to divide
> each Item into html row (<tr>...). e.g:
>
> =================
> <asp:Repeater ID="Repeater1" runat="server">
> <HeaderTemplate><table></HeaderTemplate>
>
> <ItemTemplate>
> <tr>
> <td>
> <a href="<%# xxx %>" ......><%# xxx %></a>
> </td>
> </tr>
> </ItemTemplate>
>
> <FooterTemplate></table></FooterTemplate>
> </asp:Repeater>
> ===================
>
> Hope this helps.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
.
Relevant Pages
- Ive become a hard-core userContent.CSS junkie !
... html, html * { ... display: inline!important;} ... Some of the schools have software developers... ... documenting the Source Code is different from documenting the app. ... (sci.physics) - Re: templates?
... > Some do not have a specific language so you cannot do complex things. ... > specific template to display the TR HTML tags...). ... (alt.php) - Re: Redirecting between PHP Pages
... but at the very least in a php script. ... > on the outcome of the validation, you want to do one of two things: ... with the various bits of HTML being ... Display login form ... (comp.lang.php) - Re: formating text retrieved from a db
... You had to add HTML ... > If you were to display a phrase in your browser in simple HTML, ... They have a lofty name, ... has the formating with blank lines between the paragraphs etc. there is no ... (comp.lang.php) - Re: Am I on the right track here?
... that happens to be HTML ... | display rectangle for each video in that 4x2 layout, ... | display HTML relative to each rectangle. ... Once the server hands the page to the browser, the server, ... (comp.lang.php) |
|