Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp.net repeater control word wrap

Posted on 2011-03-24
3
Medium Priority
?
1,643 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

886 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