Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Make Data proper Case before Insertion

Posted on 2011-02-15
5
Medium Priority
?
350 Views
Last Modified: 2012-05-11
I have an asp.net formview built where text boxes are bound to different columns.  On several of the fields, I need to have the information put into proper case before inserting it into the database.

I've read about the str(conv), but not really sure how/where it should go.  Could someone give an easy exampl?   I'm just learning.....Thanks!
0
Comment
Question by:kellysmith120
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 8

Accepted Solution

by:
PagodNaUtak earned 1500 total points
ID: 34902526

Dim sText As String = "Hello World"
' Returns "hello world".
Dim sNewText As String = StrConv(sText, VbStrConv.ProperCase)

Open in new window

0
 

Author Comment

by:kellysmith120
ID: 34907170
Thanks, Pago, I think I understand that code.  The silliness that's causing me trouble is Where should it go?  For instance, my text box on my Formview looks like this

<asp:TextBox ID="testcolumnTextBox" runat="server"
                            Text='<%# Bind("testcolumn") %>' />

and my Insert Statement looks like this:

 InsertCommand="INSERT INTO [Table1] ([testcolumn]) VALUES (@testcolumn)"

There are several fields that will need this done to.  I know this must be SO simple, but I've got this great big mental block for some reason.  THANKS!
0
 

Author Comment

by:kellysmith120
ID: 34946934
Can anyone else tell me where this code should go in my example?
0
 

Author Comment

by:kellysmith120
ID: 34965586

The code given doesn't work for my example, as I'm using a Formview and parameters and bound fields.  Anyone?

0
 

Author Closing Comment

by:kellysmith120
ID: 35833981
Although technically accurate, did not work with my circumstances using Formview.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question