C
Cyril Kearney
I am trying to learn C# over the internet. My ISP only allows .aspx
files. All .cs files are rejected.
The tutorials on the Internet are aimed at people able to run .cs
files from the command line. I can't do this.
Here's an almost universal first example.
using System;
class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello World !");
}
}
I've modified it to this and saved it as test.aspx but it doesn't run
<%@ Page language="c#" Debug="true"%>
<script Language="c#" runat="server">
using System;
class HelloWorld
{
public static void Main()
{
Response.Write("Hello World !");
}
}
</script>
I can't figure out what I'm doing wrong. Shouldn't all C# programs be
able to run in an .aspx file using Response.Write instead of
Console.WriteLine?
Thanks in advance for any help.
files. All .cs files are rejected.
The tutorials on the Internet are aimed at people able to run .cs
files from the command line. I can't do this.
Here's an almost universal first example.
using System;
class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello World !");
}
}
I've modified it to this and saved it as test.aspx but it doesn't run
<%@ Page language="c#" Debug="true"%>
<script Language="c#" runat="server">
using System;
class HelloWorld
{
public static void Main()
{
Response.Write("Hello World !");
}
}
</script>
I can't figure out what I'm doing wrong. Shouldn't all C# programs be
able to run in an .aspx file using Response.Write instead of
Console.WriteLine?
Thanks in advance for any help.