convert string to currency

I'm taking user input from a form and putting the info in a database. One of the fields in the database has the datatype of money. The entered value in the form comes out as string. How can I convert this entered value into the matching currency (money) value to put into my sqlserver 2000 database?

I've tried to convert it to decimal and I get an error stating that input wasn't the expected format (when using Convert.Decimal()).

I've tried to use String.Format() but I get the same error.

Any help is appreciated.
Thanks

[546 byte] By [campusliving] at [2007-12-16]
# 1
Maybe this helps:

new SqlMoney(value)


BartCoppens at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
is SqlMoney a type in C#? I tried it but the compiler didn't know what SqlMoney was. Do I need to include some namespace?

Thanks

campusliving at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
use System.Data.SqlTypes
for more information read this
AdeelbinKhalid at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...