Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp.net repeater control word wrap

Posted on 2011-03-24
3
Medium Priority
?
1,617 Views
Last Modified: 2012-05-11
In the attached code if the value of

 <asp:Label ID="Label24" runat="server" Text='<%# Eval("File_Desc") %>' />

gets to be to long it stretches the entire webform.  

What are my options so this does not happen
<asp:Repeater ID="rptMultiMedia" runat="server" >
		        	                        <ItemTemplate>
				                        <font size="2">
					                        <asp:Label ID="pathLabel0" runat="server" Text='<%# Eval("File_Name") %>' />
                        					<br />
                        					 <asp:Label ID="Label3" runat="server" Text='<%# Eval("Content_Type") %>' />
                        					 
                        					 <br />
					                     
                        					    <asp:Label ID="Label24" runat="server" Text='<%# Eval("File_Desc") %>' />
                        					
                        					<br />
                        					<asp:LinkButton ID="lnkView0" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="ViewFile" Text="View File" />&nbsp&nbsp&nbsp&nbsp
						                           <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="RemoveFile" Text="Remove File" />&nbsp&nbsp&nbsp&nbsp
						                       
						                        <asp:LinkButton ID="lnkUpdateDescription" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="UpdateFileDescription" Text="Update Description" />
						                       
				                        </font>
				                        <hr />
			                        </ItemTemplate>
		                        </asp:Repeater>

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:nbove
ID: 35207812
Add a width property to the label.  Here is an example:
<asp:Label ID="Label24" runat="server" Text='<%# Eval("File_Desc") %>' Width="400" />
0
 
LVL 9

Accepted Solution

by:
jkofte earned 2000 total points
ID: 35207882
you can give a certain witdth using a div for your item template.


<ItemTemplate>
<div style="width:500px;">
				                        <font size="2">
					                        <asp:Label ID="pathLabel0" runat="server" Text='<%# Eval("File_Name") %>' />
                        					<br />
                        					 <asp:Label ID="Label3" runat="server" Text='<%# Eval("Content_Type") %>' />
                        					 
                        					 <br />
					                     
                        					    <asp:Label ID="Label24" runat="server" Text='<%# Eval("File_Desc") %>' />
                        					
                        					<br />
                        					<asp:LinkButton ID="lnkView0" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="ViewFile" Text="View File" />&nbsp&nbsp&nbsp&nbsp
						                           <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="RemoveFile" Text="Remove File" />&nbsp&nbsp&nbsp&nbsp
						                       
						                        <asp:LinkButton ID="lnkUpdateDescription" runat="server" CommandArgument='<%# Eval("Image_Name") %>'
						                        OnCommand="UpdateFileDescription" Text="Update Description" />
						                       
				                        </font>
				                        <hr />
</div>
			                        </ItemTemplate>

Open in new window

0
 

Author Closing Comment

by:vbnetcoder
ID: 35208132
ty
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

721 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