Hi I am developing an asp.net web application using c# and having trouble
trying to display integer values, that I have taken from the database,
correctly on my webform textboxes. The values are consistently displayed
with four 0?s after the decimal point and I am just wondering if anyone
knows how to prevent this from happening. Thanks in advance.
Tadhg88
--
Message posted via http://www.dotnetmonster.com 6 1461
If they're "integer" values, they shouldn't have "decimal points"...
"Tim Whelan via DotNetMonster.c om" <fo***@nospam.D otNetMonster.co m> wrote in
message news:f1******** *************** *******@DotNetM onster.com... Hi I am developing an asp.net web application using c# and having trouble trying to display integer values, that I have taken from the database, correctly on my webform textboxes. The values are consistently displayed with four 0?s after the decimal point and I am just wondering if anyone knows how to prevent this from happening. Thanks in advance. Tadhg88
-- Message posted via http://www.dotnetmonster.com
Oh I see. I saw "0?s" and misread your post. Check out "composite
formatting" and "Columns, Datagrid Properties" in Books Online
"Michael C#" <xy*@abcdef.com > wrote in message
news:L1******** *********@fe11. lga... If they're "integer" values, they shouldn't have "decimal points"...
"Tim Whelan via DotNetMonster.c om" <fo***@nospam.D otNetMonster.co m> wrote in message news:f1******** *************** *******@DotNetM onster.com... Hi I am developing an asp.net web application using c# and having trouble trying to display integer values, that I have taken from the database, correctly on my webform textboxes. The values are consistently displayed with four 0?s after the decimal point and I am just wondering if anyone knows how to prevent this from happening. Thanks in advance. Tadhg88
-- Message posted via http://www.dotnetmonster.com
"Michael C#" <xy*@abcdef.com > wrote in message
news:ai******** ********@fe11.l ga... Oh I see. I saw "0?s" and misread your post. Check out "composite formatting" and "Columns, Datagrid Properties" in Books Online
I think you read correctly the first time, I think he meant four 0's after
the decimal point.
Tim, you'll need to explain what you're using to display the values.
Michael
Yes, I misread first thinking he had integer values that were being stored
with 4 zeros after a decimal point. I've had similar issues with the
DataGrid control, and had to force the correct formatting using composite
formatting. There might be a better way with Textboxes, but I haven't
really used ASP.NET databound textboxes, so not sure on specifics.
"Michael C" <mc*****@NOSPAM optushome.com.a u> wrote in message
news:%2******** *********@TK2MS FTNGP15.phx.gbl ... "Michael C#" <xy*@abcdef.com > wrote in message news:ai******** ********@fe11.l ga... Oh I see. I saw "0?s" and misread your post. Check out "composite formatting" and "Columns, Datagrid Properties" in Books Online
I think you read correctly the first time, I think he meant four 0's after the decimal point.
Tim, you'll need to explain what you're using to display the values.
Michael
sorry guys amateur error they are actually stored in the sql server
database table as "money" and the code im using to display them is
sqlDataAdapter1 .Fill(archivedC oncertDataSet1) ;
DataTable archivedConcert s = archivedConcert DataSet1.Tables
["ArchivedConcer t"];
foreach(DataRow myRow in archivedConcert s.Rows)
{
if(SelectConcer t.SelectedItem. ToString() == myRow[0].ToString())
{
//*** fill textboxes with the concert data
ViewNumOfPerfor mances.Text = myRow[1].ToString();
ViewFeesDue.Tex t = myRow[2].ToString();
ViewPercentageO fTicketSales.Te xt = myRow[3].ToString();
ViewTotalTicket Sales.Text = myRow[4].ToString();
ViewProfitOrLos s.Text = myRow[5].ToString();
}
}
--
Message posted via http://www.dotnetmonster.com
"Tim Whelan via DotNetMonster.c om" <fo***@DotNetMo nster.com> wrote in
message news:b5******** *************** *******@DotNetM onster.com... sorry guys amateur error they are actually stored in the sql server database table as "money" and the code im using to display them is
try ToString("0")
Michael This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Penn Markham |
last post by:
Hello all,
I am writing a script where I need to use the system() function to call
htpasswd. I can do this just fine on the command line...works great
(see attached file, test.php). When my webserver runs that part of the
script (see attached file, snippet.php), though, it doesn't go through.
I don't get an error message or anything...it just returns a "1"
(whereas it should return a "0") as far as I can tell. I have read the
PHP...
|
by: Jon Thackray |
last post by:
I'm trying to build some mathml for a paper. I've got the mathml2 dtd,
and the style sheets also from the canonical website
http://www.w3.org/Math/. But I'm having some trouble. I've input the
example from page 90 of the mathml handbook, which is a simple bounded
integral. The mathml is as follows, where I've substituted the
numerical values for the named entities:-
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE math SYSTEM...
|
by: Neo Geshel |
last post by:
This works:
<form>
<asp:TextBox id="name" />
<%= name.ClientID %>
</form>
But this DOES NOT work:
<form>
|
by: scorpion53061 |
last post by:
Well as some of you know I was using a tab control for a project I was
building for my boss.
Today he tells me that he wants:
When he switches tabs to be able to switch back and see whatever it was he
was doing on the other tab.
That may not sound like a big thing but I used the same controls for each
tab and then manually cleared the page so he didnt see the same in another
|
by: DaHool |
last post by:
Hi there !!!
I browsed around the Internet in search for a solution of a little difficult
problem i have in VB.NET....
However, i cannot find a suitable anwser anywhere, so i thought i'll give it
a try here...
Okay, here's the deal:
I am trying to read from unmanaged memory with a class type struct, this
| |
by: Eric A. Johnson |
last post by:
For the following code:
' return String representation of CTriangleShape
Public Overrides Function ToString() As String
' use MyBase reference to return CShape String
Return MyBase.ToString & ";" & vbCrLf & _
|
by: AMDRIT |
last post by:
Hello Everyone,
I would like to format the Display Members of a combobox's datasource. Is
there a way to apply a format without subclassing the original datasource?
For example, given a list of decimal values, format them as currency values
with a leading currency symbol and 2 decimal places.
TIA
Class Test
|
by: Nathan Sokalski |
last post by:
I am trying to use the System.Array.ForEach method in VB.NET. The action
that I want to perform on each of the Array values is:
Private Function AddQuotes(ByVal value As String) As String
Return String.Format("'{0}'", value)
End Function
Basically, I just want to surround each value with single quotes. However, I
am having trouble getting this to work using the System.Array.ForEach
method. This may be partially because I am not very...
|
by: matheussousuke |
last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails.
The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg
instead of
http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg
As u see, there's the website URL before the image URL.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |