Development ASP.Net Tutorial

File: StaticHelloWorld.cs
public class StaticHelloWorld
{
    public static string SayMessage()
    {
        return "Hello World!";
    }
}
File: ShowStaticHelloWorld.aspx
<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    void Page_Load()
    {
        lblMessage.Text = StaticHelloWorld.SayMessage();
    }



    Show Shared Hello World


    
    

            id="lblMessage"
        Runat="server" />