1

I am using automatically created "Create" asp.net MVC view in which I have populated fields for underlying object.

Problem is that my object has property of type Image, and i Don't know how to populate it. I've tried to use file upload, but I don't know how to reference it from controller.

Thanx, V

2 Answers 2

1

Here's a sample Photo gallery in .Net MVC:

http://www.joshholmes.com/blog/2009/01/27/BuildingASimplePhotoGalleryInASPNETMVCFramework.aspx

Perhaps this will get you going down the right path. :-)

Sign up to request clarification or add additional context in comments.

Comments

0

This is my code to get files from <input type="file">:

for (int i = 0; i < Request.Files.Count; ++i) { var hpf = Request.Files[i]; if (hpf.ContentLength > 0) { var file = new byte[hpf.ContentLength]; hpf.InputStream.Read(file, 0, file.Length); } } 

Yeah, could use foreach.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.