Skip to Content
Microsoft® .NET Kick Start
book

Microsoft® .NET Kick Start

by Hitesh Seth
December 2003
Intermediate to advanced content levelIntermediate to advanced
504 pages
10h 42m
English
Sams
Content preview from Microsoft® .NET Kick Start

Your First Web Forms Application

Because this is a kick start book, let's get started in actually using the product. Of course, being a technology, Hello World is required. So let's see how a simple Hello World application works in ASP.NET (see Listing 8.1).

Listing 8.1. Say Hello to ASP.NET
<%@ Page Language="C#" %>
<script runat="server">
    void submitButton_Click(object sender, EventArgs e) {
        message.Text = "Hello "+name.Text;
    }

    void clearButton_Click(object sender, EventArgs e) {
        message.Text = "";
        name.Text = "";
    }
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <table border="1">
            <tbody>
                <tr>
                    <td>
                        Name</td>
                    <td>
                        <asp:TextBox id="name" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td> Message</td> <td> <asp:Label id="message" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek
C# 4.0 Unleashed

C# 4.0 Unleashed

Bart De Smet

Publisher Resources

ISBN: 0672325748Purchase book