String Concat Example

 In this article we will see how to use inbuilt String Concat method to join two different strings in code behind.

Step 1: Create two textboxes to receive input, one label to show concated result and Button.

 
 

Step 2: CodeBehind

protected void btnAddStrings_Click(object sender, EventArgs e)
    {
        lblResult.Text = string.Concat(txtFirstValue.Text, txtSecondValue.Text);
    }

Final Output:

String-Concat-Example-Asp-net-CodingFusion

 

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