How to go from taking in one photo upload to taking a multiple photo upload
Right now the way I'm doing it is:
and in the View I pass that ViewModel into I'm taking in the upload like this:
This only allows uploading one photo at a time. Stack Overflow tells me that the way to do multiple would be:
But since I didn't even know one can call asp classes in the html tag like that I would really appreciate some help and guidance on how to go from what I currently have to what I want to have.
28 Replies
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
No
I got that from a very old stack overflow answer: https://stackoverflow.com/questions/17441925/how-to-choose-multiple-files-using-file-upload-control
Stack Overflow
How to choose multiple files using File Upload Control?
I have a file upload control.Now on clicking on that, I want to select multiple files.
How can I do so?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
ok, what is this era's way of doing this? 😆
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
nah, it's school that's why I'm just going off what google shows me
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
have to also consider that if that is a requirement from his teacher not much he can do, which often happens.
I don't know what you're referring to the <asp:FileUpload thing I haven't used it nor am forced to use it. I just found it from googling how to allow the upload of several photos...
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
"asp net how to upload multiple images"
I think they're just trying to keep it simple, this isn't supposed to single-handedly give you all the skills to be an experienced webdev, it's a single semester class we hadn't even touched on ASP.NET development before
How much can you teach in 3-4 months if it's one of 5/6 classes the students are taking?
Also keep in mind you haven't seen the whole project and I only come here if I'm really stuck on something so you're probably seeing only the worst parts of this development process
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
they give you the protocol and it's stipulated it's supposed to be ASP.NET MVC with MSSqlServer db, but that's pretty much it you can add anything on top if you want
I figured out you can just add multiple to the input tag lol
let's see if all the data goes like I want it to through the post
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I am using aspnetcore 8...I don't understand why you think this is so old? Is it because I use traditional HTML and not the aspnet cshtml things starting with the @?I don't use it because I personally find it confusing
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I kinda just do things my own way and don't listen to the way teachers do it, I'm just more comfortable doing it my way
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Like I said, I do not have that in my project nor want to insert it into my project it's just a random thing I found on stack overflow and copied here as an example. I had literally never even seen it before which tells you that I probably am working with the modern stuff as I didn't even knew that existed before coming accross it in google
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I understand the problem of using old software, and you're right I should be more careful with what I draw from on the internet
Not to make excuses but I don't think I ever worked with a framework with so much backward compatibility, other frameworks just don't have such a long history of the ones I worked with at least
that's a compliment to .NET :Ok:
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Thank you, I hope you believe when I say I'm actually trying to help you help me I don't know why my threads always turn into such a mess lately. I probably should be more careful :sadcat:
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
@Gipper I wonder thou did your teacher impose u to use asp.net from .net framework or are u free to use newer frameworks?
and did u create the latter or former u can check by looking at your csproj file
I know u said above aspnetcore8 I just wanted to make sure u checked it in the csproj
there was no imposition of any framework besides "ASP.NET Core MVC"
always good to make that distinction because the volume of people that comes here asking for help with older frameworks like webforms etc is pretty big.
good to know your teacher at least gave u newer framework to use and to learn with the latest features of the language