I'd like my users to be able to upload a picture to my server and without having them switch pages have that image bounced back to a div on that site once the upload has finished.
This is for a "Change your profile picture" page. I need to get the picture back so I can invoke the jCrop jquery library on it so they can crop the picture to their liking.
Here's what I have so far:
@{
ViewBag.Title = "Profile Picture";
}
<h1>Please choose your new profile picture.</h1>
<input type="file" name="file" />
<input type="submit" value="OK" />
If I put in the @using BeginForm
the form is posted back and the page loads somewhere new. I don't want this behavior. How do I do this with AJAX without reloading?