chapter 8 error
I am on chapter 8 and unable to sole this error
Created a new file Default.cshtml
The code is as follows:
@{
var message = "";
if(Request.Files.Count > 0) {
WebImage image = WebImage.GetImageFromRequest();
if(image != null) {
message ="Upload successded";
}else{
message="You must upload an image file: .jpg, .gof, .png, .tif";
}
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My Site's Title</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<h1>Upload Images</h1>
<div>@message</div>
@Fileupload.GetHtml(allowMoreFilesToBeAdded:false )
</body>
</html>
I get a compiler error message:CS0103: The name 'Fileupload' does not exist in the current context
I have looked on the internet and was told that to install web helper 1
I have tried web helper 1, 1.1 and 1.5
I am using webmatrix2
Thaks
|