string ToUpper() and ToLower() in C#

ToUpper() – ToUpper() string method in c# used to convert string alphabets values to Uppercase alphabets values.

ToLower() – ToLower() string method in c# used to convert string alphabets values to Lowercase alphabets values.

Here, we understand ToUpper() and Tolower() method with an example.

How to use ToUpper() and ToLower() string method in C#

How to use ToUpper() and ToLower() string method in C#

write below code on ToUpper() Button control click events:

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text.ToUpper();

}

code for ToLower() button control:

 protected void Button2_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text.ToLower();
}

 

When we click the button ToUpper, all the values of textbox will be converted to Uppercase, shows like below screen.

How to use ToUpper() and ToLower() string method in C#

How to use ToUpper() and ToLower() string method in C#

 

How to use ToUpper() and ToLower() string method in C#

How to use ToUpper() and ToLower() string method in C#

Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 6 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">