Read value from textbox and display on page using label
Write a program to read value from TextBox control and display on page using Label Control.
HTML
<%--//===== Label to show output.--%>
|
Enter Some Value |
<%--//==== Textbox to take input --%>
|
|
|
Code Behind
protected void btnCalculate_Click(object sender, EventArgs e)
{
//==== Read value from textbox and display on page using label.
lblResult.Text = txtValue.Text;
}
Final Output: