Converting a text input field into a decimal

T

TheRemedy

I have a problem. using the data adapter I have configured it to accept data
entry from text fields. However, there are a couple of fields in the
database which have a database type of decimal. there aren't any server
controls which specifically handle decimals and I tried converting the
variable to a decimal format. then using the variable in the parameters to
input into the database. I still get a message telling me invalid format.
Help
 
R

raagz

Hi,

Try this
(decimal) TextBox1.Text;
decimal d = decimal.Parse(TextBox1.Text);

If the error still persists then put the code in try ...catch
statement and check the stack trace.

Hope this helps you.

Thanks
Raghavendra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top