I am attempting to write a C# cgi script that retrieves the value of an input field form on an HTML page I wrote. I read documentation on HttpRequest but I still can't get my code to compile
I have been google searching and nothing I have tried works. I have a very basic hello world C# cgi script which works. Here is the code which does not compile.
using System;
using System.Web;
using System.Web.UI;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Content-Type: text/html");
Console.WriteLine("");
Console.WriteLine("<HTML>");
Console.WriteLine("<HEAD>");
Console.WriteLine("<BODY>");
Console.WriteLine("<H3>Hello from a csharp compiled CGI script</H3>");
string mydata = Request["mydata"];
Console.WriteLine("</BODY>");
Console.WriteLine("</HTML>");
}
}
}
I get an error message as follows: error CS0103: The name 'Request' does not exist in the current context