Ask a Question related to ASP, Design and Development.

  1. #1

    Default Capital Letters

    I have a form which people use to register in a database. The form passes
    the input data to an asp page that then updates the database.

    The thing is, people often don't bother starting their firstname & surname
    with a capital letter on the form. When this data is dispalyed on other
    pages it would look so much better if they did.

    Does anybody know a way of manipulating the input so that I can substitute
    the first letter of an input string for a capital letter before I update the
    database?

    Some code would be great.

    Cheers.


    Miguel Orrego Guest

  2. Similar Questions and Discussions

    1. M I.5,Perse cution , Capital Radi o - Chri s T arrant
      -=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= -= Capital Radio. - Chris Tarrant -= -=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= Capital Radio DJs have. been "in on...
    2. How to convert to mixed case from capital
      Hi I have a string like "KRISHNA MURTHY" in the database when i retrieve from database it has to show "krishna Murthy" (the first letters must...
    3. Letters printing on top of each other.
      I have a problem can't find support on. The pdf file has letters appearing on top of each other. It only happens 1 time every 3 pages or so. The word...
    4. Capital letter to small letter in Flash MX
      Hi there I am doing a search tool in Flash MX and using a .xml as the archive containing the text At the moment I am using "indexof" as the...
    5. Expanded Capital Macro
      I have been using the simple Capitol macro to capitol the first letter of words in my field and it works fine: StrConv(.,3) But some names have...
  3. #2

    Default Re: Capital Letters

    "Miguel Orrego" <miguel@stressedmonkey.net-nospam> wrote in message
    news:3f4225da$0$18497$cc9e4d1f@news.dial.pipex.com ...
    > I have a form which people use to register in a database. The form passes
    > the input data to an asp page that then updates the database.
    >
    > The thing is, people often don't bother starting their firstname & surname
    > with a capital letter on the form. When this data is dispalyed on other
    > pages it would look so much better if they did.
    >
    > Does anybody know a way of manipulating the input so that I can substitute
    > the first letter of an input string for a capital letter before I update
    the
    > database?
    >
    > Some code would be great.
    fname = ucase(left(firstname, 1)) & right(firstname, len(firstname)-1)

    Seems kinda sloppy, but it should work. Any quicker methods?

    --
    Mike


    Mike Guest

  4. #3

    Default Re: Capital Letters

    > Does anybody know a way of manipulating the input so that I can substitute
    > the first letter of an input string for a capital letter before I update
    the
    > database?
    firstname = capit(firstname)

    function capit(str)
    str = ucase(left(str,1)) & mid(str,2)
    end function


    Randy Rahbar Guest

  5. #4

    Default Re: Capital Letters

    > function capit(str)
    > str = ucase(left(str,1)) & mid(str,2)
    > end function
    Oops... this should read..

    function capit(str)
    capit= ucase(left(str,1)) & mid(str,2)
    end function


    Randy Rahbar Guest

  6. #5

    Default Re: Capital Letters

    Mike wrote:
    > "Miguel Orrego" <miguel@stressedmonkey.net-nospam> wrote in message
    > news:3f4225da$0$18497$cc9e4d1f@news.dial.pipex.com ...
    >> ...
    >> Does anybody know a way of manipulating the input so that I can
    >> substitute the first letter of an input string for a capital letter
    >> before I update the database?
    >>
    >> Some code would be great.
    >
    > fname = ucase(left(firstname, 1)) & right(firstname, len(firstname)-1)
    >
    > Seems kinda sloppy, but it should work. Any quicker methods?
    depends on what use the data is required for.

    To output to HTML one could employ CSS: see 'text-transform' and
    'first-letter' in your favourite search engine.

    --
    William Tasso - [url]http://WilliamTasso.com[/url]


    William Tasso Guest

  7. #6

    Default Re: Capital Letters

    Randy Rahbar wrote on 19 aug 2003 in
    microsoft.public.inetserver.asp.general:
    >> function capit(str)
    >> str = ucase(left(str,1)) & mid(str,2)
    >> end function
    >
    > Oops... this should read..
    >
    > function capit(str)
    > capit= ucase(left(str,1)) & mid(str,2)
    > end function
    capit= ucase(left(str,1)) & lcase(mid(str,2))

    Some people are called O'Brian:

    =====================

    Function ProperCase(a)
    b=""
    notyet=true
    For i=1 to Len(a)
    m=mid(a,i,1)
    If notyet Then
    b=b+Ucase(m)
    Else
    b=b+Lcase(m)
    End If
    If Ucase(m)=Lcase(m) Then
    notyet= true
    Else
    notyet=false
    End If
    Next
    ProperCase=b
    End Function

    =====================

    For a Dutch site,
    the lowering of "van", de", "der" should be considered.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan. Guest

  8. #7

    Default Re: Capital Letters

    In news:3f4225da$0$18497$cc9e4d1f@news.dial.pipex.com ,
    Miguel Orrego <miguel@stressedmonkey.net-nospam> typed:
    : I have a form which people use to register in a database. The form
    : passes the input data to an asp page that then updates the database.
    :
    : The thing is, people often don't bother starting their firstname &
    : surname with a capital letter on the form. When this data is
    : dispalyed on other pages it would look so much better if they did.

    Not to be too coy, but it would look better to *you*. Why decide? Let the
    user type the name in how they want to it appear (with obvious limitations
    on "special/extended" characters). Give the user the ability to change the
    way their name appears and leave it at that.

    As mentioned in another post a dutch name with "de" should be left in lower
    case, you would suggest changing it to:

    Hans de Husen to Hans De Husen, which to the user, would not "look much
    better" if you did.

    My 2 cents, don't sweat the small stuff.

    Don Verhagen
    Tandem Staffing Solutions, Inc.






    : Does anybody know a way of manipulating the input so that I can
    : substitute the first letter of an input string for a capital letter
    : before I update the database?
    :
    : Some code would be great.
    :
    : Cheers.


    Don Verhagen Guest

  9. #8

    Default Re: Capital Letters

    "Evertjan." wrote:
    >
    > Yes, empty strings exist.
    >
    > No, you cannot type them in.
    I am, for better or worse, stuck with a mind that accepts nothing at face
    value, so I gave this some thought, and concur.

    I note, however, that (a) you can un-type a non-empty string (thus making it
    empty), and (b) you can type a NULL value in Enterprise Manager (CTRL+0).


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.


    Dave Anderson Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139