You should prefix it with a namespace:
if (System.IO.File.Exists(picPath))
{
//Other code
}
The reason for that is because you are writing this code inside a controller action which already defines a File
method on the Controller class.
More Related Contents:
- How to display indirect data in Jqgrid
- HTML.ActionLink method
- Pass array to mvc Action via AJAX
- Hyphenated html attributes with asp.net mvc
- Getting full URL of action in ASP.NET MVC [duplicate]
- How to RedirectToAction in ASP.NET MVC without losing request data
- 404 error after adding Web API to an existing MVC Web Application
- An error occurred during report processing. -RLDC reporting in ASP.NET MVC
- How to clear browser cache on browser back button click in MVC4?
- How do I log a user out when they close their browser or tab in ASP.NET MVC?
- How can I return the current action in an ASP.NET MVC view?
- how to make a wizard with ASP.Net MVC
- string.empty converted to null when passing JSON object to MVC Controller
- Dictionary map to an object using Automapper
- Async action filter in MVC 4
- Why is Asp.Net Identity IdentityDbContext a Black-Box?
- EditorFor() and html properties
- How can I secure passwords stored inside web.config?
- Asp.Net MVC3: Set custom IServiceProvider in ValidationContext so validators can resolve services
- How to add Web API to an existing ASP.NET MVC (5) Web Application project?
- MVC 3: How to render a view without its layout page when loaded via ajax?
- razor view with anonymous type model class. It is possible?
- How do I detect when a directory or file changes without constant scanning
- How can I upload a file and save it to a Stream for further preview using C#?
- put page number when create PDF with iTextSharp
- Uploading image in ASP.NET MVC
- How to create custom additional fields in UserProfile in MVC4
- Is the DataTypeAttribute validation working in MVC2?
- Streaming large list of data as JSON format using Json.net
- MVC Form Validation on Multiple Fields