Last post Aug 22, 2018 11:54 PM by coreysan
Aug 20, 2018 05:15 PM|coreysan|LINK
I have some code in a view that helps the user select a filepath:
<div class="form-group row">
<input type="file" name="files" class="form-control" />
This code came from a tutorial, and in normal working condition this would display a text box with the path showing, and then a button next to the text box.
In my case, the text box is missing, the button is there, and then it says next to the button "No file selected."
When I replaced this code block with simpler instructions to show the contents of Inventory.ImagePath, it showed the correct path from the DB.
Is there anything you can see in this code that is wrong?
I made sure that when I followed the tutorial, I used the same software versions for VS 2017 and Core 2.
But obviously, something is different!
Aug 21, 2018 03:44 AM|Sherry Chen|LINK
A doubt , what do you want the label to display?
display the path of the selected file
display the path that you want to save the selected file
Aug 21, 2018 04:18 AM|vahid bakkhi|LINK
maybe you lost the jquery reference and css reference
Aug 21, 2018 03:46 PM|coreysan|LINK
Thank you Sherry, for your help with my question. I believe the problem is that I had an older version of JQuery.
Again, thanks for your help!
Aug 21, 2018 03:47 PM|coreysan|LINK
Good call! Thanks so much - that makes perfect sense. I recall that the tutorial did suggest updating the
Aug 21, 2018 04:09 PM|coreysan|LINK
I made sure that all the css and js files were identical to the github repository for this tutorial, but I still get the problem.
I'll try to contact the author of the tutorial.
When his page is displayed, it shows a textbox with a filepath showing, and it's roughly
about 4 columns wide, and then there's a button for file navigation just to the right of the text box.
On my project, there's no text box at all, and the button is justified left.
It's not a critical problem, since this is just a tutorial, but I'd sure like to figure it out if possible! Any other ideas?
Aug 22, 2018 02:20 AM|Sherry Chen|LINK
Is the effect you want to get as shown below?
Different browsers will display different input effects.
You could view it in Microsoft Edge or Internet Explorer
Aug 22, 2018 11:54 PM|coreysan|LINK
Why didn't I remember to check for that?!!!
I've been using Firefox, and the tutorial uses IE.
Thanks so much Sherry = just brilliant!