Does anyone have ASP.NET samples?

valley9

New Member
Messages
3
Reaction score
0
Points
0
Hi, I'm having lots of trouble starting up an ASP.NET website on this server.

All I'd want (for now) is just to create a single empty webpage with a single button or textbox.

I wasn't able to find any ASP.NET-on-Mono samples on the internet.

So I was wondering whether anyone has created any samples of a basic working page in ASP.NET with mono, which uses basic GUI elements (e.g. buttons, textboxes, etc.) and which works on this server.

... or do you think that trying to run GUI ASP.NET elements isn't really appropriate on Mono...



Thanks!
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
ASP.NET is fine to run here. The problem you will encounter is Mono supports .NET up to somewhere in between 2.0 and 3.5. If you can find an old .NET 2.0 tutorial, you'll be in good shape.

A basic .NET "hello world":

Code:
<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <% if (Page.IsPostBack) {
           Response.Write("<p>Hello World!</p>");
      }
       else { %>
           <asp:Button runat="server" Text="Hello" />
      <% } %>
    </div>
    </form>
</body>
</html>
 
Top