Solved

asp.net repeater control word wrap

Posted on 2011-03-24
3
1,577 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 500 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 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