Solved

asp.net repeater control word wrap

Posted on 2011-03-24
3
1,529 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
Comment Utility
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
Comment Utility
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
Comment Utility
ty
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now