0

in my web application, I am using datalist, in that i am displaying images and below that i am displaying name of that image. I am displaying images in horizontal and display 5 images for a row. My problem is due to the long length of the image name the space between cells are huge. Can we display the name in second line.

Please help if u do not understand my problem tell me I will explain once again.

this is source code

<asp:DataList ID="DataList1" RepeatColumns="9" RepeatDirection="Horizontal" 
     runat="server" Width="719px" >
   <ItemTemplate>
     <center>
       <img src='AlumniGallery/compressed/<%# Eval("Photoname")%>' id="img1" 
           width="75px" height="85px"/><br />           
       <asp:LinkButton ID="LinkButton1" ForeColor="black" CssClass="xyz" 
           Width="165px" CommandArgument='<%# Eval("Photoname")%>'  
           CommandName='<%# Eval("slno")%>' runat="server" 
           OnCommand="LinkButton2_Command"><%# Eval("name")%></asp:LinkButton>
     </center> </ItemTemplate>
</asp:DataList>
6
  • Totally unclear, bad English, not the first time. -1 Commented Sep 25, 2009 at 9:05
  • Can you post the code for displaying images inside the datalist? Commented Sep 25, 2009 at 9:05
  • 1
    bad english is not a reason for down vote. If you can then try to improve the grammar and spelling in the question. Commented Sep 25, 2009 at 9:06
  • just i send my source code please verify Commented Sep 25, 2009 at 9:07
  • i just spelled correctly my question please veryfi Commented Sep 25, 2009 at 9:12

1 Answer 1

1

try using this:

  <ItemStyle Width="100px" Wrap="true" /> //this will limit width of the 
                                          //item and wrap long text
  <ItemTemplate>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.