Click here to Skip to main content
15,884,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using
C++
<input type="file" class="form-control" id="file" name="file">


I want to display name of file that is coming from Model Class in MVC. How do i do that?

Please help.

(In Place of "No file chosen", i want the file name. How can i alter its Css)
Posted
Updated 27-Apr-15 21:36pm
v2
Comments
Andy Lanng 28-Apr-15 5:38am    
add runat="server" and the input will be available in the code behind. You can update the field before it loads or on postback before it loads.
Is that the answer you're asking for?
dirtyshooter 28-Apr-15 5:43am    
nope. i am using MVC not ASP.NET. I want the default text in field,i.e."Choose file" to become my file name.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900