Results 1 to 2 of 2

Thread: Dynamically created Link Button how to create a event handler

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    1

    Dynamically created Link Button how to create a event handler

    Hi,

    Im trying to create a downloadable list of a directory using asp.net.

    Ive got it listing and navigating folders and listing files.

    But I can not create a downloadable link using the h= new hyperlink method.
    So i thought I would try a link button where I can add my own custom event handler.

    Filename is the url of the file using file://path/path/filename

    Dim h = New LinkButton
    h.Text = FileName

    But im lost how do i create a event handler for this???


    Even a different example would be helpful to list files and folders and then be able to download or view a file.

    Thanks

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Dynamically created Link Button how to create a event handler

    You cannot use that filename because it would redirect the user to that path on his OWN computer, and not the server. You'll have to create a page which handles that file and outputs it in a stream to the client computer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width