ViewBag.Title = "Home Page";
<script src="../../Scripts/swfobject.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
<link href="../../Content/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function () {
'uploader': '/content/uploadify.swf',
'script': '/Home/Upload',
'cancelImg': '/content/cancel.png',
'folder': 'UploadFile',
'queueID': 'fileQueue',
'auto': false,
'multi': true,
'onComplete': function (event, ID, fileObj, response, data) { $('#div_img').after("&nbsp;&nbsp;&nbsp;<img src=" + response + " alt='' height='100' width='100' />") }
<div id="div_img">
<div id="fileQueue" style="text-align: center">
<input type="file" name="uploadify" id="uploadify" />
<a href="javascript:$('#uploadify').uploadifyUpload()"> Upload </a>&nbsp; <a href="javascript:$('#uploadify').uploadifyClearQueue()">
Cancel upload </a>
public string Upload(FormContext from)
var file = Request.Files["Filedata"];
string uploadPath = Server.MapPath("~/images/");
string url = "/images/" + file.FileName;
if (file != null)
file.SaveAs(uploadPath + file.FileName); return url;// Return the saved address
return "";
} }

MVC No refresh upload images and display more related articles

  1. Thinkphp frame -- ajax No refresh upload image

    use Thinkphp Frame to do no refresh upload pictures View layer View <!doctype html> <html lang="en"> <head> < ...

  2. nodejs utilize ajax Realize no refresh of webpage, upload picture

    nodejs utilize ajax Realize no refresh of webpage, upload picture label ( The blank space to separate ): nodejs In general, uploading images is done by submitting form Form , But it's inevitable that there will be a web page turn . utilize ajax Technology and FormDat ...

  3. php No refresh to upload pictures and files

    The core idea : adopt Html Of iframe Label properties operate on top-level windows , Reuse php Dynamic no refresh upload image file . Examples are as follows : demo |------uploads # Store uploaded files |------index.php | ...

  4. Use SWFUpload No refresh upload image

    Use SWFUpload Component no refresh upload image While working on the project , Need to use a picture of no refresh upload , I've heard of it before SWFUpload, So I want to go through SWFUpload To upload pictures without refresh , Because my project belongs to ASP.NET ...

  5. MVC No refresh paging

    MVC No refresh paging ( Local refresh , With search , Page number selection , Sorting function )   I've looked at a lot of websites , Most of the comment pages are partially refreshed , But most of the e-commerce product display pages have refresh pages , So I did an example of no refresh pagination for commodity display . continue with ...

  6. ajaxFileUpload.js No refresh upload image , Multiple parameters can be uploaded at the same time , Support ie6-ie10

    /* 131108-xxj-ajaxFileUpload.js No refresh upload image jquery plug-in unit , Support ie6-ie10 rely on :jquery-1.6.1.min.js Main method :ajaxFileUpl ...

  7. TP3.2: Realization Ajax No refresh upload image

    1. be based on TP3.2+ajaxfileupload Upload pictures without refresh , This time only one , More than one will be sent out later 2. effect :   3.html Code : <html> <head> < ...

  8. No refresh upload image ,ajax and iframe

    iframe Upload upload.html 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...

  9. MVC No refresh query ,PagedList The paging control uses , export Excel

    Use MVC It's been in development for a while , Summarize the use of no refresh part of the view .PagedList The use of paging controls . @using PagedList @model StaticPagedList<T> < ...

Random recommendation

  1. EMC And capacitance ( Two )- The meaning of capacitance parameter 、 Characteristics and application of each capacitor

    The last question , See a lot of answers about X capacitance ,Y capacitance ,NPO And so on , What do these strange parameters mean ? Many times before BOM You can see these parameters in the table , Always ignoring the past , Just this time EMC This knowledge is also mentioned in the course , Just after ...

  2. Java How to wait for a child thread to finish executing

    Work often encounter asynchronous to execute a piece of logic , Then deal with other things first , After processing, summarize the processing results of that logic , At this point, you need to use threads . After a thread starts , It's asynchronous to execute what needs to be executed , It won't affect the main line ...

  3. topcoder Algorithm exercises 2

    Problem Statement      In most states, gamblers can choose from a wide variety of different lottery ...

  4. Html A In the label href and onclick usage 、 difference 、 Priority

    original text :Html A In the label href and onclick usage . difference . Priority If not set href Attribute in IE6 There will be no response below hover. Double click to select the parent container of the label instead of this one a label (IE It's a problem all over the world ). ...

  5. c# Remove the text of html label

    public static string ContentReplace(string input) { input = Regex.Replace(input, @"<(.[^> ...

  6. java Reptile technology

    Yuanbo :http://983836259.blog.51cto.com/7311475/1730243 Open source crawler classification : 1. Distributed crawlers :Nutch 2.JAVA Stand alone crawler :Crawler4j.WebMag ...

  7. !Web Cloud notes --HTML Basics

    Web Self study notes the first stage of notes summary Reference material :<Head First HTML&CSS>( Chinese Second Edition )( The United States ) Friant ISBN:9787508356464 China Electric Power Press All stages : ...

  8. js Delay function

    Write it correctly : setTimeout(function (){ alert("delay!"); },5000); Wrong writing : setTimeout( alert("dela ...

  9. JavaScript Garbage collection mechanism

    JavaScript Language is an excellent scripting language . It includes the flexibility of scripting language and many features of high-level language . For example, it allows you to build and instantiate an object , Garbage collection mechanism (GC:Garbage Collecation). Usually we make ...

  10. Centos7.2 Next OpenVPN Environment full deployment record

    About OpenVPN And why to use OpenVPN I won't go over it here , The following is a direct record Centos7.2 Deployment under the system OpenVPN The operation of the environment : 1) First of all, put the yum For Alibaba cloud yum Source [[email protected] ...