473,626 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Case conversion

Hi

How can one change a textbox content to mixed case (first letter of each
word cap, rest small) in asp (vb.net)?

Thanks

Regards
Nov 19 '05 #1
3 1782
TJS
in a function called "Proper case". Search this out on Google
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Oi******** ******@TK2MSFTN GP14.phx.gbl...
Hi

How can one change a textbox content to mixed case (first letter of each
word cap, rest small) in asp (vb.net)?

Thanks

Regards

Nov 19 '05 #2
On Thu, 30 Jun 2005 17:42:03 +0100, "John" <Jo**@nospam.in fovis.co.uk> wrote:

¤ Hi
¤
¤ How can one change a textbox content to mixed case (first letter of each
¤ word cap, rest small) in asp (vb.net)?
¤

Dim Phrase As String = "this is a test"
Dim TextArray As String() = Nothing
Dim Word As String
Dim NewString As String
TextArray = Phrase.Split(" ")
For Each Word In TextArray
NewString = NewString & (Word.Substring (0, 1).ToUpper() & Word.Substring( 1, Word.Length
- 1).ToLower() & " ")
Next Word
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #3

Also here is a sample from MSDN for the same

http://msdn.microsoft.com/library/de...lacetopic1.asp
"Paul Clement" wrote:
On Thu, 30 Jun 2005 17:42:03 +0100, "John" <Jo**@nospam.in fovis.co.uk> wrote:

¤ Hi
¤
¤ How can one change a textbox content to mixed case (first letter of each
¤ word cap, rest small) in asp (vb.net)?
¤

Dim Phrase As String = "this is a test"
Dim TextArray As String() = Nothing
Dim Word As String
Dim NewString As String
TextArray = Phrase.Split(" ")
For Each Word In TextArray
NewString = NewString & (Word.Substring (0, 1).ToUpper() & Word.Substring( 1, Word.Length
- 1).ToLower() & " ")
Next Word
Paul
~~~~
Microsoft MVP (Visual Basic)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2257
by: Tumurbaatar S. | last post by:
Hi, I'm running MySQL 3.23.55 on WinXP and have some problem using non latin charset. I've added these 2 lines under group of my.ini: character-sets-dir = c:/mysql/share/charsets/ default-character-set=cp1251 Then restarted server and created a simple database
5
16570
by: Nils O. Selåsdal | last post by:
Is there some quick C++ way I can do something similar to string::find , but case insensitive ?
22
6432
by: DJ | last post by:
Can someone tell me the library call that converts strings to lower case or retrns a new string that is lower case of the original, thanks im using <string> David
14
1823
by: amit | last post by:
Hello group, In a method of my class I have below problem in terms of type case. Can somebody please give me insight into this? This function returns a pointer into the array at the specified index. Please know that the array containing image data. void* CImageArray::ElementIndex( long iIndex) const
11
3807
by: jguilford | last post by:
I have created a SQL Stored Procedure that uses a Case statement to determine the Order By. For one of the Case statements I am trying to turn a Char field into Datetime in for the Order By, however I can not get it to work. Can someone please take a look and my code below and tell me what I am doing wrong. Thank you. ORDER BY CASE WHEN @SortBy = 'dttm_stamp' THEN dttm_stamp End, CASE WHEN @SortBy = 'Event_Date1' THEN...
9
1675
by: vindhya | last post by:
I have a small query. If I have a character from alphabets and I want to change case of the same then how is it possible ? Here are the solutions, but can you suggest any other solution may be using bit operations. Solution#1 : Use tolower/toupper Solution#2 : Add/Subtract 32 Thanks in advance
0
1388
by: n33470 | last post by:
We have a web site that is being converted from the 1.1 format into 2.0. I've noticed that after the web project has been converted, the first time that the solution is opened in VS, all of the aspx and ascx filenames are changed to lowercase. The filenames are not being changed during the conversion process. After conversion completes, the filenames remain unchanged. However, the first time that the solution is opened in VS2005, the...
2
1889
by: ranjiththarayil | last post by:
Consider the following code snippet ------------------ float fi=12.598; printf("\n %.2f \n",fi); ------------------ the output of this would be 12.60 (note when we give the conversion specifier as "%.2f" the result is rounded to 12.60) My requirement is the value be 12.59 instead of 12.60.Are there any
2
1871
by: WittyGuy | last post by:
Hi My class looks something like this: class Base { public: Base () {} ~Base () {} // No virtual dtor in the base class private: };
55
3131
by: aarklon | last post by:
Hi, why general integer expressions are not allowed in case labels in switch statements..????
0
8262
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6122
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.