AJAX makes data transaction very fast in application without post back of a page. In this article i have uploaded image using AJAX without handler.
There are lots of solutions in Google regarding upload image using AJAX with handler but handler is not working on server sometimes so i have converted image to DataURL
and from this DataURL generated bitmap image and then we can save it in folder.
when we select file than "PreviewImage(this)" function called and DataURL generate from image and it will saved in hiddenfield.
When we click on "Save Image" button than "UploadFile()" function calls and it passes DataURL to code behind
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; using System.IO; using System.Drawing; using System.Data.SqlClient; using System.Configuration; using System.Data;
In this way it is very easy to save bitmap image in perticular folder. You can modify this code acccording to your need. You can insert image DataURL or image path in Database and retrieve it from database and you can bind it in gridview or repeater as you want.
Initial level : 05 August 2014, Second release will be soon with jQuery slider.