• Log in or sign up for an account here: https://www.sythe.org/login

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

  • Thread starter Thread starter Senthrax
  • Start date Start date
S

Senthrax

Guest
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.
 
Runescape Gamblingrunescape gambling
Back
Top