Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How can pass more than one file type in view to controller ?
Mani Kandan
Jan 24 2017 4:14 AM
249
Reply
Hello everyone,
In MVC 5, I have view contain 2 file type input control,
@model Reboxwebapp.Models.ViewModel.PartnerVM
@using (Html.BeginForm("Index", "Home", FormMethod.Post, new {
enctype
=
"multipart/form-data"
}))
{
Logo Image:
@Html.TextBoxFor(
model
=
>
model.LogoImage, new {
type
=
"file"
,
id
=
"fileToUploadLogo"
})
Title Picture:
@Html.TextBoxFor(
model
=
>
model.TitlePictureImage, new {
type
=
"file"
,
id
=
"fileToUploadTitle"
})
<
input
type
=
"submit"
value
=
"OK"
/>
}
How can I pass each image to controller?
[HttpPost]
public
ActionResult GetPartner(PartnerVM partnerVM, HttpPostedFileBase fileUpload)
{
partnerBL.LogoImage = ??
partnerBL.TitlePictureImage = ??
}
Please help me...
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Create registration form using db approach in mvc
how to assign linkbutton name in gridview