Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:53:39+00:00 2026-06-10T05:53:39+00:00

I have this code_behind that get some info from an folder and then show

  • 0

I have this code_behind that get some info from an folder and then show the files on my page.

Sub fileinfo()
    Dim objDI As New System.IO.DirectoryInfo(Server.MapPath("upload/files/"))
    Dim allFile As New ArrayList()
    allFile.AddRange(objDI.GetFiles("*.png"))
    allFile.AddRange(objDI.GetFiles("*.jpg"))
    allFile.AddRange(objDI.GetFiles("*.bmp"))
    allFile.AddRange(objDI.GetFiles("*.gif"))
    allFile.AddRange(objDI.GetFiles("*.pdf"))
    allFile.AddRange(objDI.GetFiles("*.doc"))
    allFile.AddRange(objDI.GetFiles("*.docx"))

    Me.showfiles.DataSource = allFile
    Me.showfiles.DataBind()
End Sub

Then i have this code on my main page, but i get an table how can i do so i only get the UL/LI list !?
Im new to this and not a pro.

<ul class="thumbnails">
                            <asp:DataList ID="showfiles" runat="server" RepeatColumns="5" CellPadding="10">
                                <ItemTemplate>
                                    <li class="span2"><a class="thumbnail" href="#"><asp:ImageButton ID="folderfiles" runat="server" ImageUrl='<%# string.Format("upload/files/{0}", DataBinder.Eval(Container.DataItem,"Name")) %>' ToolTip='<%# Bind("Name") %>' height="82" width="119" /></a></li>
                                </ItemTemplate>
                            </asp:DataList>
                            </ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:53:40+00:00Added an answer on June 10, 2026 at 5:53 am

    Okay in that case just set the property RepeatLayout="flow" in datalist i.e.

    <asp:DataList ID="showfiles" runat="server" RepeatColumns="5" CellPadding="10" RepeatLayout="flow">
        <ItemTemplate>
            // existing stuff
        </ItemTemplate>
    </asp:DataList>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that is used to replace certain page output with other
I have made a page that allows users to upload files to the server
In code-behind of an ASP.NET page I have this method: public string TestFunc() {
I have this question: How could I call a codebehind method from jquery? I
I have a Silverlight application that needs to scroll some data (like stock information)
I have one issue that i want to ping URL from code behind (EXE
I have a TreeView implemented in WPF that is bound to some XML data
I have a button on my page that does an Ajax callback with an
So I have this Access Database Project file that I have been tasked to
I am working on a WP7 app that displays some times on one page.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.