i want to change first letter of both First name and Last Name to uppercase here is my code however, i am getting error..as
Index and length must refer to a location within the string.
Parameter name: length
MY CODE IS AS BELOW :
Function uppercasefirstletter(ByVal oldString As String) As String
Dim firstletter As Char
Dim newString As String
firstletter = Char.ToUpper(oldString.Substring(0, 1))
Mid(oldString, 1, 1) = firstletter
newString = oldString
Return newStringEnd Function
PLZ LET ME KNOW THE ERROR AS QUICK AS POSSIBLE...AM WORKING WITH VB.NET 2005 THIS CODE HOWEVER WORKED IN VB.NET 2003 PLZ HELP ME TO SOLVE THE ERROR
THANKS
CYA
ROHAN