String ToLower() Method
String ToLower() method return a copy of the specified string converted to lowercase. this string method exists in the System namesapce.
the ToLower() method return value type is System.String which is a lowercase string. this method does not modify the provided string
instance, it just return a new instance of string object in which all characters are lowercase. this ToLower() method return a new string by
converting all the characters to lowercase from provided string.
the ToLower() method have an overload method that is ToLower(CultureInfo). this ToLower(CultureInfo) method return a copy of the specified string converted to lowercase, using the casing rules of the specified culture.
the following .net c# example code demonstrate us how can we convert a string to lowercase characters in an asp.net application.
the ToLower() method have an overload method that is ToLower(CultureInfo). this ToLower(CultureInfo) method return a copy of the specified string converted to lowercase, using the casing rules of the specified culture.
the following .net c# example code demonstrate us how can we convert a string to lowercase characters in an asp.net application.
ToLower.aspx
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
protected void page_Load(object sender, System.EventArgs e) {
if(!this.IsPostBack)
{
TextBox1.Text = "CLICk BUTTON FOR Convert string to Lowercase.";
TextBox1.Width = 350;
}
}
protected void Button1_Click(object sender, System.EventArgs e) {
string myString = TextBox1.Text.ToString();
string modifiedString = myString.ToLower();
Label1.Text = "String converted successfully to lower case!";
TextBox1.Text = modifiedString;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to convert (change) a string to lowercase characters in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:Red">asp.net string example: ToLower()</h2>
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
ForeColor="HotPink"
Font-Bold="true"
Font-Italic="true"
>
</asp:Label>
<br /><br />
<asp:Label
ID="Label2"
runat="server"
Text="Test String"
ForeColor="Green"
>
</asp:Label>
<asp:TextBox
ID="TextBox1"
runat="server"
BackColor="DarkGreen"
ForeColor="SpringGreen"
>
</asp:TextBox>
<br /><br />
<asp:Button
ID="Button1"
runat="server"
OnClick="Button1_Click"
Font-Bold="true"
Text="Change String To Lowercase"
ForeColor="Green"
/>
</div>
</form>
</body>
</html>


- How to convert a string to int
- How to get a substring from a string
- How to convert a string to uppercase characters
- How to format a string to add commas in thousands place for a number
- How to get only first n characters from a string
- How to convert a hex string to color
- How to convert a string to camelcase
- How to convert a string to decimal
- How to convert a delimited string to a dictionary
- How to convert a string to a double array