We'll have a text box (aka input line) where entering a string; and a button to push when done with it. A function would be then called, that would read the string we input and write it in a label.
Being such a simple code, we will put all directly in the ASP page.
I'm using an asp:TextBox named myTextBox; an asp:Button, myButton, with the associated text "OK" and the OnClick even handler associated to a method named click; and finally an asp:Label named myLabel.
The click() method would simply say that the text in myTextBox should be assigned to the text of myMessage.
Here is the resulting ASP page:
<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
void click(Object s, EventArgs e)
myMessage.Text = myTextBox.Text;
<head id="Head1" runat="server">
<form id="myForm" runat="server">
<asp:TextBox id="myTextBox" runat="server" />
<asp:Button id="myButton" text="OK" runat="server" onClick="click" />
Your input message is: <asp:Label id="myMessage" runat="server" />