ASP fileupload - event detection

Discussion in 'Programming' started by EagleKeeper, Nov 3, 2012.

  1. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Oct 30, 2000
    Likes Received:
    Time find out what I am missing

    Intent is to open the equivalent of FileOpen dialog
    User selects the file name
    Selects the Open button on the file dialog
    Dialog closes

    Here is the issue

    At present, there is a pre-rendering event that happens when an additional control is selected. At this point, I know the dialog is closed because the pre-render has taken place.

    However, I want to know when the dialog is closed. I need to run some code and enable/setup additional controls on the web page at that point that were not exposed until the File selection has been made.

    Issue is mainly cosmetic formatting, but there should be some answer to this.

  2. Train

    Train Lifer

    Jun 22, 2000
    Likes Received:
    You want a server side or client side event?

    Are you still using Web Forms? I havent used them in a few years. It seems the .Net community has moved away from the concept of "events" on the server side, it was kind of a klunky mental model. Are you working on a legacy app? If not I would recommend using any of the dozen or so MVC styled frameworks. Makes it so mch easier to keep cleaner, seperated code.
  3. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus

    Sep 16, 2005
    Likes Received:
    The whole idea of knowing when the dialog is closed is meaningless on the server-side. Webforms or MVC, you are getting a POST or GET from the browser, and sometime before that the user did or didn't open the dialog and specify a value for the file type input element in the form . On the client-side the file open dialog is handled by the browser when the user clicks the "browse" button next to a file type input element. If you want to know when the user closes the resulting dialog there is probably a way to catch that in javascript.
Similar Threads - fileupload event detection Forum Date
Printer PCL6 language- Schedule a wake up event? Programming Apr 8, 2016
What happens at the machine level when you attach an event handler? Programming Nov 6, 2015
Cookie detection message in IE Programming Apr 9, 2013
Events - Win32 vs MFC apps Programming Jan 16, 2013
Lightweight discrete event simulation software Programming Dec 6, 2010