All i'm looking to do is create a page where the user enters text into various text boxes and then it is displayed below with other text. This is the code I have thus far, but i can't get it to work.

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

<script runat="server">

    public void ctrlName_Change(object Sender, EventArgs E)
    {
    ctrlMessage.Text = "Hello " + ctrlName.Text;
    }

    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>WebDev - Example</title>
    </head>
    <body>

    <form id="WebForm" runat="server">
        <p>WebDev - Example - A Simple Page</p>

        <p>Please enter your name:

        <asp:TextBox id="ctrlName"
                OnTextChanged="ctrlName_Change"
                runat="server" />
        <asp:Button id="ctrlSubmit" Text="Submit" runat="server" /></p>

        <p><asp:Label id="ctrlMessage" font-size="20pt" runat="server" /></p>
    </form>

    </body>
</html>

Handle button pressing, then set Label.Text = YourTextBox.Text;

Please for more questions on developing web application via C# aka ASP.NET, go to this forum http://www.daniweb.com/forums/forum18.html to find vast and clear answers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.