?
Solved

repeater control layout question

Posted on 2011-02-18
3
Medium Priority
?
219 Views
Last Modified: 2012-05-11
i am using a repeater control. Can somebody tell me how to make the content in the label control to wrap to the next line if it reaches a certain length?  Currently, it is causing the control itself to stretch


<ItemTemplate>
                     <font size="2"><b><label style="padding-right:93px;">Category ID</label><%#Eval("Category_ID")%><b></font> 
                                                
                        <br />
                         <font size="2"><b><label style="padding-right:82px;">Category Path</label><%#Eval("Category_ID")%><b></font> 
                        <br />
                        <font size="2"><b><label style="padding-right:126px;">Name</label><%#Eval("Category_Name")%><b></font> 
                        <br />
                        <font size="2"><b><label style="padding-right:93px;">Description</label><%#Eval("Category_Description")%><b></font> 
                       <br />
                        <font size="2"><b><label style="padding-right:67px;">Parent Category</label><%#Eval("Category_ID")%><b></font> 
                       <br />
                        <font size="2"><b><label style="padding-right:125px;">Image</label><%#Eval("Image_Name")%><b></font> 
                       <br />                                         
                      </ItemTemplate>

Open in new window

0
Comment
Question by:vbnetcoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Expert Comment

by:iopen
ID: 34931113
You could try putting a fixed width in your ItemTemplate

        <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
                <table border="1" width="100%">
                    <tr bgcolor=Gray>
                    <th>Category ID</th>
                    <th>Category Path</th>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Parent Category</th>
                    <th>Image</th>
                    </tr>
        </HeaderTemplate>        
        <ItemTemplate>
                    <tr>
                         <td width ="110"><%#Eval("Category_ID")%></td>
                         <td width ="110"><%#Eval("Category_ID")%></td>
                    <td width ="110"><%#Eval("Category_Name")%></td>
                    <td width ="110"><%#Eval("Category_Description")%></td>
                    <td width ="110"><%#Eval("Category_ID")%></td>
                    <td width ="110"><%#Eval("Image_Name")%></td>
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                        </table>
          </FooterTemplate>
        </asp:Repeater>

You would have to play with the widths to get to desired result...
0
 
LVL 13

Accepted Solution

by:
devlab2012 earned 2000 total points
ID: 34932696
In above code, change the <table> tag to :

<table border="1" width="100%" style="table-layout:fixed">
0
 

Author Closing Comment

by:vbnetcoder
ID: 34981433
ty
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question