开发者

Asp.Net MVC 3.0 pass Values in upload function

开发者 https://www.devze.com 2023-02-15 14:16 出处:网络
public ActionResult Index(HttpPostedFileBase file,string type) { //body } This is an Index function where if I give only file parameter it works but if I wish to give parameter with file to get the

public ActionResult Index(HttpPostedFileBase file,string type) { // body

    }

This is an Index function where if I give only file parameter it works but if I wish to give parameter with file to get the value of the dropdown selected item then how should I do in mvc3.0. @using (Html.BeginForm("Index", "Home", FormMethod.Post, new { enctype = "multipart/form-data" })) { } This is what I am using for File Upload. Select Type1 I want the selected value from here help me out to sort开发者_如何学JAVA out this.


Any values in the same form as the input file will be submitted along with the file and are located in your Request.Form collection.

0

精彩评论

暂无评论...
验证码 换一张
取 消