AjaxFileUpload:

The AjaxFileUpload control is used to upload multiple files to the server folder. While uploading files it will display the upload progress for every files. Also AjaxFileUpload control also supports a drag-and-drop interface.

AjaxFileUpload which supports:

Displaying File Upload Progress

Uploading Very Large Files (greater than 1 Gigabyte)

Client-Side File Chunking

Uploading Multiple Files at a Time

Drag-and-Drop File Upload

 

Here I’m going to explain how to use AJAX FileUpload control to upload multiple files to the server folder.

Here we have to add AjaxControlToolkit assembly reference in our page

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

 

Then we have to create our aspx page like this

 

Designer source code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>AJAX FileUpload</title>

</head>

<body>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    <div  align="center">

        <asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" AllowedFileTypes="jpg,jpeg,png,gif"

                            MaximumNumberOfFiles="10" OnUploadComplete="File_Upload"

                            Width="500px" />

    </div>

    </form>

</body>

</html>

 

Here we have to add following namespace

 

using AjaxControlToolkit;

 

C# code:

  

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using AjaxControlToolkit;

 

public partial class _Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    { 

    }

    protected void File_Upload(object sender, AjaxFileUploadEventArgs e)

    {

        string filename = e.FileName;

        string strDestPath = Server.MapPath("~/Documents/");

        AjaxFileUpload1.SaveAs(@strDestPath + filename);       

    }

}

 

cytotec abortion

http://www.extrageek.com/template/default.aspx?an-abortion-pill buy abortion pills online
medical abortion pill online cytotec abortion abortion pill


View demo Download
http://www.dotnetfox.com/Document/1081/0Demo1.gif

If you enjoyed this article, get email updates (it's free).


Related Articles
  • File Upload in Gridview ASP.NETIn this article I’m going to explain how to use file upload control in grid view for uploading images or files to the server. The FileUpload control allows you to provide users with a way to send a file from their computer to the server. The control is useful for allowing users to upload images, text files or other files. Here I’ll show you how to use file upload control in gridview to upload the ...
  • Parse or read CSV file using TextFieldParser in ASP.NET CSV file contains multiple values which are separated by commas (,). In order to parse CSV file, we need to write some code. TextFieldParser class in the Microsoft.VisualBasic.FileIO namespace is used to parse CSV files. TextFieldParser reads in CSV files. With it, we specify a delimiter string, and then can read in the fields of every line in a loop. While parsing CSV file, it doesn’t fetch heade...
  • Store images to database and bind to GridView in ASP.NETThis tutorial will show you how to store images to database and bind to gridView. I have used FileUpload control to upload image from our computer and it’ll be stored to database as binary format and display these images to GridView. First we have to create a table with three fields, ImageID, ImageName and Image. We need to store Image as binary format so we have to use varbinary() datatype.
  • AJAX FileUpload or multiple FileUpload with progress example in ASP.NETThe AjaxFileUpload control is used to upload multiple files to the server folder. AjaxFileUpload uses one of two methods of showing file upload progress. If you are using a browser which fully supports the HTML5 File API (such as Google Chrome or Mozilla Firefox) then upload progress is displayed using client-side events. If, on the other hand, you are using a browser which does not fully support ...
  • Store and Retrieve Image from database in ASP.NETThis tutorial will show you how to store and retrieve image from database. I have used FileUpload control to upload image from our computer and it’ll be stored to database as binary format. First we have to create a table with three fields, ImageID, ImageName and Image. We need to store Image as binary format so we have to use varbinary() datatype.

Comments
comments powered by Disqus

Thanks for downloading..!!

×
Subscribe via Email
    
message to display in fancybox