Solved

asp.net repeater control word wrap

Posted on 2011-03-24
3
1,596 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

Industry Leaders: 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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
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…

623 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