Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. populating a datagrid

populating a datagrid

Scheduled Pinned Locked Moved ASP.NET
wpfsysadmindata-structureshelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viktor9990
    wrote on last edited by
    #1

    I have a datagrid with 2 item templates inside a hyperlink and a label (which will show the file name and creation date of files which resides on a folder on the server. I'm using a procedure (GetScannedFiles()) to loop and get the required information from the folder but don't know how to show this info inside my datagrid ( dynamically or from my aspx page). I appreciate any help. Here is the code for( MyDatagrid.aspx):

    .....

    Here is the code behind for (Mydatagrid.aspx.vb) Private Sub GetScannedFiles() 'Name of the folder which holds the scanned TIFF files (agreements images) Dim FolderPath As String = Server.MapPath("/TrackerAggreement/admin/FilesTIFF/") Dim source As DirectoryInfo = New DirectoryInfo(FolderPath) 'Get an array of all scanned TIFF files in the source direcotry Dim sourceFiles As FileInfo() = source.GetFiles("*.tiff") 'Loop to get File Names and Creation Time of the TIFF files in the source direcotry Dim i As Integer For i = 0 To i < (sourceFiles.Length) 'Get the File Name of every scanned TIFF file Dim FileName As String = Path.GetFileName(sourceFiles(i).FullName) 'Get the Creation Time of every scanned TIFF file Dim FileDate As String = Path.GetFileName(sourceFiles(i).CreationTime) i = i + 1 Next End Sub

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups