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:

TextBox-value-to-label-asp-net-practicle-question-codingfusion

 

 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2024 CodingFusion
50+ C# Programs for beginners to practice