473,499 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting not apply

Simple question.
The formatting code I use in my projet does not apply in my asp pages at
run time.
Any Idea Why ???
Thanks in advance !!!
Esperanza

Example 1
this.txtPrix.Text =
System.String.Format("{0:c}",dtrProduitVIPComposan tPrix["sglPrixActuel"].ToS
tring());
result : 15.4567

Example 2
Another example this time in html to format a datagrig column in a pourcent
format

<asp:Label id=dg_lblPourc runat="server" Text='<%#
fctPourcComposant(DataBinder.Eval(Container, "DataItem.dblPourcentage")) %>'
DataFormatingString="{0:p}">
result :1.7876654433
Nov 29 '05 #1
2 1541
I would try :
- to suppress "ToString" (in case 1 you are applying a numeric format to a
string as you used ToString)
- in case 2 try to specify the format as the 3rd argument of Eval (check the
doc but I don't remember to have seen a DataFormatingString member for the
Label control ?)

--
Patrice

"Esperanza" <es**********@hotmail.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl...
Simple question.
The formatting code I use in my projet does not apply in my asp pages at
run time.
Any Idea Why ???
Thanks in advance !!!
Esperanza

Example 1
this.txtPrix.Text =
System.String.Format("{0:c}",dtrProduitVIPComposan tPrix["sglPrixActuel"].ToS tring());
result : 15.4567

Example 2
Another example this time in html to format a datagrig column in a pourcent format

<asp:Label id=dg_lblPourc runat="server" Text='<%#
fctPourcComposant(DataBinder.Eval(Container, "DataItem.dblPourcentage")) %>' DataFormatingString="{0:p}">
result :1.7876654433

Nov 29 '05 #2
It's working (both)!!
Thank you so much !!
Esperanza

"Patrice" <no****@nowhere.com> a écrit dans le message de
news:eJ**************@tk2msftngp13.phx.gbl...
I would try :
- to suppress "ToString" (in case 1 you are applying a numeric format to a
string as you used ToString)
- in case 2 try to specify the format as the 3rd argument of Eval (check the doc but I don't remember to have seen a DataFormatingString member for the Label control ?)

--
Patrice

"Esperanza" <es**********@hotmail.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl...
Simple question.
The formatting code I use in my projet does not apply in my asp pages at run time.
Any Idea Why ???
Thanks in advance !!!
Esperanza

Example 1
this.txtPrix.Text =

System.String.Format("{0:c}",dtrProduitVIPComposan tPrix["sglPrixActuel"].ToS
tring());
result : 15.4567

Example 2
Another example this time in html to format a datagrig column in a

pourcent
format

<asp:Label id=dg_lblPourc runat="server" Text='<%#
fctPourcComposant(DataBinder.Eval(Container, "DataItem.dblPourcentage"))

%>'
DataFormatingString="{0:p}">
result :1.7876654433


Nov 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4111
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I...
4
3112
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
8
12007
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
5
8943
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
2
1639
by: John Mason | last post by:
Hi, I have a Datagrid control with an edit command column, which has a PushButton ButtonType. I am trying to apply formatting to the plain grey button, to make it look more appealing on...
0
1234
by: ronchese | last post by:
Hello All. I'm using the RichTextBox control to show text to user that can do the primary font formatting: fontname, size, color, bold, italic and underline. Unlike the RichTextBox used in VB...
8
8457
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
0
1425
by: RCM | last post by:
I'm having trouble formatting a currency value in a template field. I have searched around and found all sorts of suggestions on how to handle a BoundField, most importantly the necessity of...
0
1110
by: macbasic | last post by:
Hi, I am a learner who is automating some data from reports to ease my month end pressures. The code below is used to open a text file (a report from our ERP) and seperate the text into columns. Two...
10
9642
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through...
0
7130
marktang
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,...
0
7007
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...
0
7171
Oralloy
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,...
0
5468
agi2029
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,...
1
4918
isladogs
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...
0
4599
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...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.