Occurs when new Upload object is created by EAUploadModule.

Namespace:  EasyAlgo.EAUpload
Assembly:  EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.0.0

Syntax

C#
public event EventHandler UploadInit
Visual Basic (Declaration)
Public Event UploadInit As EventHandler

Remarks

UploadInit event raises when new instance of Upload class is created by EAUploadModule. It occurs when another upload request(HTTP POST request with "multipart/form-data" content type) is intercepted. If you get a new instance of Upload class over call GetUpload(String) method, then UploadInit does not rise.

Use handler of this event if you need to define a specific environment for single upload process.

Examples

The following example handles the UploadInit event and retrieves just created Upload object.
CopyC#
// Global.asax.cs

public class Global : System.Web.HttpApplication
{
    ...

    protected void EAUploadModule_UploadInit(Object Source, EventArgs Details)
    {
        Upload _upload = (Upload)Source;

        // Put your initialization code for Upload here...

    }

    ...

}
CopyVB.NET
' Global.asax.vb


Public Class Global
    Inherits System.Web.HttpApplication

    ...

    Sub EAUploadModule_UploadInit(ByRef Source As Object, ByRef Details As EventArgs)

        Dim _upload As Upload = CType(Source, Upload)

        ' Put your initialization code for Upload here...


    End Sub    

    ...

End Class

See Also