Reputation: 1890
I am trying to get this simple example working from http://www.dotnetperls.com/ashx.
When I add the '<%@ WebHandler Language="C#" Class="Handler" %>' first line the compiler highlights every line and gives two errors as per screenshot.
I have tried visual studio build actions of 'Content' and 'Compile' but no difference.
I've got to be missing something simple here!?
Upvotes: 0
Views: 1130
Reputation: 16144
Remove '<%@ WebHandler Language="C#" Class="Handler" %>' form .ashx.cs file. This is for .ashx file.
To view the content of .ashx file, right click on .ashx file & click on View Markup as shown the screen shot below.
Upvotes: 4