• Create design code
       <asp:FileUpload ID="filUpload" runat="server" />
        <asp:Button ID="cmdUpload" runat="server" OnClick="cmdUpload_Click" Text="Upload" />

  • Server Side Code:

 protected void cmdUpload_Click(object sender, EventArgs e)
    {
        if (filUpload.PostedFile != null && filUpload.PostedFile.ContentLength > 0)
        {
            byte[] bData = new byte[filUpload.PostedFile.ContentLength];
            filUpload.PostedFile.InputStream.Read(bData, 0, filUpload.PostedFile.ContentLength);

            //Retrieve filename
            System.IO.FileInfo oInfo = new System.IO.FileInfo(filUpload.PostedFile.FileName);
           
        }
    }

Back to ASP.NET

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 24-May-2017 15:30 by UnknownAuthor
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 1815

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1