0

I am going through the tutorial to send emails from a Razor view. The tutorial uses the WebMail helper

https://learn.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/11-adding-email-to-your-web-site

I am attempting the part of the tutorial where the ProcessRequest.cshtml page is created, however the provided code does not seem to reference the necessary namespace (System.Web.Helpers).

I've added in @using System.Web.Helpers at the top of the Razor view, however, it is not recognized as a namespace and yields the error:

The type or namespace name 'Helpers' does not exist in the Namespace 'System.Web'

I know this is the proper namespace, however I must not be implementing it properly. Anyone know what is going on?

StateofDK
  • 153
  • 4
  • 19
  • I'd say add a reference to System.Web, but I don't see helpers in there. – Scriven Jul 11 '18 at 19:56
  • Related? https://stackoverflow.com/questions/34402956/system-web-helpers-not-found-in-vs2015 – Dan Wilson Jul 11 '18 at 19:57
  • 1
    Possible duplicate of [System.Web.Helpers not found in VS2015](https://stackoverflow.com/questions/34402956/system-web-helpers-not-found-in-vs2015) – orhtej2 Jul 11 '18 at 20:01

1 Answers1

2

You need to download the dll or you can install it via a NuGet package called Microsoft-web-helpers

https://www.nuget.org/packages/microsoft-web-helpers/

Scriven
  • 438
  • 4
  • 12