Hello:
I am working on an ASP .NET page and I have a integral value being
bound to a textbox.
I have it formatted with {0:N0} so that I get commas, but not decimal
places. When I go to update, I get an 'Input String not in the correct
format' error. I am not sure why it is okay for interface to correctly
display my data, but then not be able to update.
What is the fix?
Thanks,
Travis 4 12727
try
public static decimal ToDecimal(string value)
{
if (value == null || value.Length == 0)
return 0;
if (value == null)
throw new ArgumentNullException("value");
return Decimal.Parse(value.Replace(" ", ""), NumberStyles.AllowThousands |
NumberStyles.AllowDecimalPoint | NumberStyles.AllowCurrencySymbol,
CultureInfo.CurrentCulture);
}
--
Misbah Arefin https://mcp.support.microsoft.com/profile/MISBAH.AREFIN http://www.linkedin.com/in/misbaharefin
"je**********@gmail.com" wrote:
Hello:
I am working on an ASP .NET page and I have a integral value being
bound to a textbox.
I have it formatted with {0:N0} so that I get commas, but not decimal
places. When I go to update, I get an 'Input String not in the correct
format' error. I am not sure why it is okay for interface to correctly
display my data, but then not be able to update.
What is the fix?
Thanks,
Travis
On Feb 27, 4:09*am, Misbah Arefin
<MisbahAre...@discussions.microsoft.comwrote:
try
public static decimal ToDecimal(string value)
{
* if (value == null || value.Length == 0)
* * return 0;
* if (value == null)
* * throw new ArgumentNullException("value");
* return Decimal.Parse(value.Replace(" ", ""), NumberStyles.AllowThousands |
NumberStyles.AllowDecimalPoint | NumberStyles.AllowCurrencySymbol,
CultureInfo.CurrentCulture);
}
--
Misbah Arefinhttps://mcp.support.microsoft.com/profile/MISBAH.AREFINhttp://www.linkedin.com/in/misbaharefin
"jehugalea...@gmail.com" wrote:
Hello:
I am working on an ASP .NET page and I have a integral value being
bound to a textbox.
I have it formatted with {0:N0} so that I get commas, but not decimal
places. When I go to update, I get an 'Input String not in the correct
format' error. I am not sure why it is okay for interface to correctly
display my data, but then not be able to update.
What is the fix?
Thanks,
Travis- Hide quoted text -
- Show quoted text -
That comes with too much work for something that should be built in.
On Feb 27, 4:09*am, Misbah Arefin
<MisbahAre...@discussions.microsoft.comwrote:
try
public static decimal ToDecimal(string value)
{
* if (value == null || value.Length == 0)
* * return 0;
* if (value == null)
* * throw new ArgumentNullException("value");
* return Decimal.Parse(value.Replace(" ", ""), NumberStyles.AllowThousands |
NumberStyles.AllowDecimalPoint | NumberStyles.AllowCurrencySymbol,
CultureInfo.CurrentCulture);
}
--
Misbah Arefinhttps://mcp.support.microsoft.com/profile/MISBAH.AREFINhttp://www.linkedin.com/in/misbaharefin
"jehugalea...@gmail.com" wrote:
Hello:
I am working on an ASP .NET page and I have a integral value being
bound to a textbox.
I have it formatted with {0:N0} so that I get commas, but not decimal
places. When I go to update, I get an 'Input String not in the correct
format' error. I am not sure why it is okay for interface to correctly
display my data, but then not be able to update.
What is the fix?
Thanks,
Travis- Hide quoted text -
- Show quoted text -
I did what you said with the FormView and GridView Updating and
Inserting event handlers. I'm not too happy about it. I'm going to go
boil my head.
On Feb 27, 4:09*am, Misbah Arefin
<MisbahAre...@discussions.microsoft.comwrote:
try
public static decimal ToDecimal(string value)
{
* if (value == null || value.Length == 0)
* * return 0;
* if (value == null)
* * throw new ArgumentNullException("value");
* return Decimal.Parse(value.Replace(" ", ""), NumberStyles.AllowThousands |
NumberStyles.AllowDecimalPoint | NumberStyles.AllowCurrencySymbol,
CultureInfo.CurrentCulture);
}
--
Misbah Arefinhttps://mcp.support.microsoft.com/profile/MISBAH.AREFINhttp://www.linkedin.com/in/misbaharefin
"jehugalea...@gmail.com" wrote:
Hello:
I am working on an ASP .NET page and I have a integral value being
bound to a textbox.
I have it formatted with {0:N0} so that I get commas, but not decimal
places. When I go to update, I get an 'Input String not in the correct
format' error. I am not sure why it is okay for interface to correctly
display my data, but then not be able to update.
What is the fix?
Thanks,
Travis- Hide quoted text -
- Show quoted text -
Oh, and thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jesse |
last post by:
Hi All,
I've been working on a form that has several bound
controls that all link to one table in a dataset. In the
table, there is a column for the filename of jpeg images
related to each...
|
by: Composer |
last post by:
I've read many postings about the problem of Access.References.IsBroken
and the consensus seems to be that late binding is the cure-all.
I have a very complex Access application that needs...
|
by: Zlatko Matić |
last post by:
I was reading about late binding, but I'm not completely sure what is to be
done in order to adjust code to late binding...
For example, I'm not sure if this is correct:
early binding:
Dim ws...
|
by: Hutty |
last post by:
I've looked around and have yet to find anything that would answer my
question regarding formating a column in a datagrid. My grid looks like
this as far as data"
AMHQCON|51300.01|-3147
The...
|
by: Tubs |
last post by:
I am trying to use data binding to avoid having to write event
handlers everywhere for my data transfer from controls to data source
and all is working well except, i have a condition i would like...
| |
by: Slonocode |
last post by:
I have some textboxes bound to an access db. I wanted to format the
textboxes that displayed currency and date info so I did the following:
Dim WithEvents oBidAmt As Binding
oBidAmt = New...
|
by: manir |
last post by:
Hi,
It would really be of great help if you could suggest a solution for me.
Program:
I need to execute a stored procedure from an Oracle server through a C++ program using oci.h (Oracle...
|
by: Steve K |
last post by:
First problem:
I am specifying a format string for a Binding object like so:
<code>
Binding binding = new Binding("Text",
item.EOBRemittance,
"AmountAllowed",
true,
DataSourceUpdateMode.Never,...
|
by: Tomasz J |
last post by:
Hello developers,
I bind my TextBox control specyfying a format stored in my application
global ApplicationContext object - it has a static string CurrencyFormat
property.
The problem - this...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |