[ASP.net] Pure 1st Basics: Hello World

Discussion in 'Web Programming' started by Senthrax, Apr 16, 2007.

[ASP.net] Pure 1st Basics: Hello World
  1. Unread #1 - Apr 16, 2007 at 6:38 PM
  2. Senthrax
    Referrals:
    0

    Senthrax Guest

    [ASP.net] Pure 1st Basics: Hello World

    Just the simple basic code to display something using ASP.NET

    Code:
    <%@ Page Language="VB" %>
    <script runat="server">
        Sub Page_Load(Sender As Object, E As EventArgs)
            lblHello.Text = "Hello World!"
        End Sub
    </script>
    
    <html>
    <head>
    <title>Hello World</title>
    </head>
    <body>
    
    <asp:label id="lblHello" runat="server" />
    
    </body>
    </html>
    What happens here is when a page loads the text of the label named lblHello will be set to "Hello World"

    You can just edit this in code or drag a label from the design view of Microsoft Visual Webdeveloper Express 2005 (wich is FREE software to download) to your webpage and edit the properties in the properties view.

    To get to the Page_Load procedure, where you enter the code to display the text when loading the page, you just need to double click the page in design view so that visual webdeveloper generates the Page_Load procedure for you.

    Its as easy as that.
     
< New to a Weblanguage (HTML, javascript...)? | How to kill a comp undetected? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site