Raising an event in code

  • Thread starter Thread starter Don W
  • Start date Start date
D

Don W

I want to use the browse functionality of the asp:filedownload control
programatically without the client clicking on the asp:filedownload browse
button(FileDownload1.visible=false.) How does one raise the OnClick event of
the asp:filedownload control programatically?
 
setting visible false causes the control to not render. try:

<asp:FileUpload ID="file1" runat="server" style="display:none;"/>
<button onclick="document.getElementById('file1').click();">click
me</button>

-- bruce (sqlwork.com)
 
Thank you, Bruce! This is exactly what I needed. Don't know why I didn't
think of that, but it's exactly what I was trying to do.

Don
 
Back
Top