Converting to lower case

Results 1 to 3 of 3

Thread: Converting to lower case

  1. #1
    Join Date
    Dec 1969

    Default Converting to lower case

    Hi,<BR><BR>Im trying to compare to variables in an if loop. Now to you convert them to lower case. In VB you use lcase() in c# i can&#039;t find the dawrn function!!<BR><BR>Eg Code:<BR><BR>if (myDataView[i]["user_id"] == txtLogin.Text) {<BR> Response.Write("true");<BR>} else {<BR> Response.Write("false");<BR>}<BR><BR>Chris Bond -<BR>

  2. #2
    Join Date
    Dec 1969

    Default Use .ToLower()

    Use the ToLower method of the String class:<BR><BR>String s = "This is in mixed Case, Eh?!";<BR>Response.Write(s + "<BR>");<BR>Response.Write("LOWER CASE IT!: " + s.ToLower());<BR><BR><BR><BR>hth

  3. #3
    Pete Flanagan Guest

    Default RE: Converting to lower case

    You can also try using the String.Compare method. One of the overloaded methods allows you to provide two strings as parameters and also a boolean indicating a case-sensitive or insensitive comparison.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts