Visual Studio - Sentence Case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all

sorry if this is in the wrong group -

I have just started using Visual Studio.net 2003 - MSDN reporting tools - I
come from a MS Access Background

I need to verify sentence case

eg emailid - should show (e-mail address removed) - and not
(e-mail address removed)

how do I set this up

my fields will be:
SELECT clientcode // firstname // lastname // emailid
FROM client
WHERE client.emailid ?????????

well I am presuming this is where I am heading!

thanks
 
Hi Jewel,

You could use String.ToLower on the address.

string s = "(e-mail address removed)";
s = s.ToLower();
 
Morten gives half the answer. First change all characters to lower
case as he explains, then use the TitleCase method of the TextInfo
class as this article [1] explains. Doing so would be one way
to obtain 'validated' results.

Google: "sentence case"+"asp.net"

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] http://www.codeassist.com/Default.aspx?tabid=35&g=posts&t=52
 
Hi Jewel,

Ok, you want to know about Proper case for the name and Lower case for the
email address. This is found in a handy function called StrConv. Please see
the code snippet below as an example of how StrConv is used.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim strFirstName As String
Dim strLastName As String
Dim strEmailId As String
Dim strEmailAddress As String
strFirstName = "JOHN"
strLastName = "SMITH"
strEmailId = "AOL.COM"
strFirstName = StrConv(strFirstName, VbStrConv.ProperCase)
strLastName = StrConv(strLastName, VbStrConv.ProperCase)
strEmailId = StrConv(strEmailId, VbStrConv.LowerCase)
strEmailAddress = strFirstName & strLastName & "@" & strEmailId

MsgBox(strEmailAddress, MsgBoxStyle.Information, "Example")

End Sub

Rachel Kozlowski
 
Back
Top