Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

ASP.NET File Uploader with Overwrite Message

, 3 Dec 2008 CPOL
Intranet file upload dialog box with overwrite prompt and file archiving.
FileUploader.zip
archive
bin
FileUploader.dll
Images
ajaxloader.gif
blank.gif
btnBrowse.jpg
btnBrowseDisabled.JPG
btnCancel.jpg
btnCancelDisabled.jpg
btnCancelMouseOver.jpg
btnClose.jpg
btnCloseDisabled.jpg
btnCloseMouseOver.jpg
btnOverwrite.jpg
btnOverwriteDisabled.jpg
btnOverwriteMouseOver.jpg
btnReplace.jpg
btnReplaceDisabled.jpg
btnReplaceMouseOver.jpg
btnSave.jpg
btnSaveDisabled.jpg
btnSaveMouseOver.jpg
icon_caution.gif
My Project
Application.myapp
Settings.settings
pending
FileUploader.vbproj.user
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.1433
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On



'''<summary>
'''_Default class.
'''</summary>
'''<remarks>
'''Auto-generated class.
'''</remarks>
Partial Public Class _Default

    '''<summary>
    '''frmUploadFile control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents frmUploadFile As Global.System.Web.UI.HtmlControls.HtmlForm

    '''<summary>
    '''hFileExists control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hFileExists As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''hDestFolderPath control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hDestFolderPath As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''hReturnFileName control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hReturnFileName As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''hReturnForm control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hReturnForm As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''hReturnField control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hReturnField As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''hOverwrite control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents hOverwrite As Global.System.Web.UI.HtmlControls.HtmlInputHidden

    '''<summary>
    '''ScriptManager1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents ScriptManager1 As Global.System.Web.UI.ScriptManager

    '''<summary>
    '''panFileUpload control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents panFileUpload As Global.System.Web.UI.WebControls.Panel

    '''<summary>
    '''UpdatePanel1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents UpdatePanel1 As Global.System.Web.UI.UpdatePanel

    '''<summary>
    '''lblFile control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents lblFile As Global.System.Web.UI.WebControls.Label

    '''<summary>
    '''lblFolder control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents lblFolder As Global.System.Web.UI.WebControls.Label

    '''<summary>
    '''uploadFile control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents uploadFile As Global.System.Web.UI.WebControls.FileUpload

    '''<summary>
    '''txtUploadedFile control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents txtUploadedFile As Global.System.Web.UI.WebControls.TextBox

    '''<summary>
    '''imgButtonBrowse control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents imgButtonBrowse As Global.System.Web.UI.WebControls.Image

    '''<summary>
    '''imgBeforeButtons control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents imgBeforeButtons As Global.System.Web.UI.WebControls.Image

    '''<summary>
    '''btnSave control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnSave As Global.System.Web.UI.WebControls.ImageButton

    '''<summary>
    '''btnClose control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnClose As Global.System.Web.UI.WebControls.ImageButton

    '''<summary>
    '''btnCancel control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnCancel As Global.System.Web.UI.WebControls.ImageButton

    '''<summary>
    '''btnCancelOverwrite control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnCancelOverwrite As Global.System.Web.UI.WebControls.ImageButton

    '''<summary>
    '''imgBeforeMessage control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents imgBeforeMessage As Global.System.Web.UI.WebControls.Image

    '''<summary>
    '''lblUploadMessage control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents lblUploadMessage As Global.System.Web.UI.WebControls.Label
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

BrianLaF
Web Developer
United States United States
Started programming in Business Basic in the 1980's and acquired my AS in Computer Science at that time. Promoted to IS Manager after one year of programming (sink or swim).
Self taught in SMC Basic, Visual Basic, C Shell, perl, ASP, JavaScript, vb.net, asp.net.
Now working as a Network Administrator at a hospital in Northern California.
Fell into a webmaster role when implementing the company's intranet website to support documentation.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 4 Dec 2008
Article Copyright 2008 by BrianLaF
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid