通过Ajax在MVC中发送图像 [英] Send image in MVC through Ajax

查看:116
本文介绍了通过Ajax在MVC中发送图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我想在MVC中将图像数据传输到控制器。

现在我正在使用:

@使用(Html.BeginForm(上传,我的,FormMethod.Post,新{enctype =multipart / form-data}))



在控制器中:

公共ActionResult上传(HttpPostedFileBase文件)



没关系,但我想用ajax。

我该怎么办????

解决方案

这可能会对你有所帮助 [ ^ ]





这可能会对您有所帮助 [ ^ ]

Hi all !!!
I want to transfer data of image to controller in MVC .
Now i am using :
@using (Html.BeginForm("Upload", "My", FormMethod.Post, new { enctype = "multipart/form-data" }))

In controller:
public ActionResult Upload(HttpPostedFileBase file)

It is OK, but i want to use ajax .
How can i do ????

解决方案

This may help you[^]


This may help you[^]


这篇关于通过Ajax在MVC中发送图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆