I find a very nice Jquery plug in called Uploadify for this. You can download it from here.
They have starting example on the site a PHP code snippet. I just want to share my Asp.net Implementation.
First of all download Jquery and Uploadify plug in the create a Asp.net website using Visual Studio or Visual Web Developer and copy the "uploadify" folder to your web site. Now Add reference of following files to your aspx page. like this
Now include the reference to uploadify.css file. otherwise it will not display as you expect.
Now add this script to you aspx page
Finally Add a Generic handler (see the Handler.ashx in front of 'script' property of uploadify)
<%@ WebHandler Language="C#" Class="Handler" %>Happy coding :)
using System;
using System.Web;
public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
string path = string.Empty;
for (int j = 0; j < uploadfile =" context.Request.Files[j];" path =" context.Server.MapPath("> 0)
{
uploadFile.SaveAs(path);
}
}
}
public bool IsReusable {
get {
return false;
}
}
}
you can read detail of uploadify function and its properties from here
Now run the page and it will look like image below.