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.Te xt =
System.String.F ormat("{0:c}",d trProduitVIPCom posantPrix["sglPrixAct uel"].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='<%#
fctPourcComposa nt(DataBinder.E val(Container, "DataItem.dblPo urcentage")) %>'
DataFormatingSt ring="{0:p}">
result :1.7876654433 2 1548
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 DataFormatingSt ring member for the
Label control ?)
--
Patrice
"Esperanza" <es**********@h otmail.com> a écrit dans le message de
news:%2******** ********@TK2MSF TNGP10.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.Te xt =
System.String.F ormat("{0:c}",d trProduitVIPCom posantPrix["sglPrixAct uel"].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='<%# fctPourcComposa nt(DataBinder.E val(Container, "DataItem.dblPo urcentage"))
%>' DataFormatingSt ring="{0:p}"> result :1.7876654433
It's working (both)!!
Thank you so much !!
Esperanza
"Patrice" <no****@nowhere .com> a écrit dans le message de
news:eJ******** ******@tk2msftn gp13.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 DataFormatingSt ring member for
the Label control ?)
-- Patrice
"Esperanza" <es**********@h otmail.com> a écrit dans le message de news:%2******** ********@TK2MSF TNGP10.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.Te xt =
System.String.F ormat("{0:c}",d trProduitVIPCom posantPrix["sglPrixAct uel"].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='<%# fctPourcComposa nt(DataBinder.E val(Container, "DataItem.dblPo urcentage")) %>' DataFormatingSt ring="{0:p}"> result :1.7876654433
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 want all of the controls in whatever is the CURRENT record to have it's
data bolded on the screen. (Question #1: Is there a SIMPLE way to refer to
the Current Record?)
I've been trying to use a Bookmark to specify the current record, but it
|
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 background
colour.
In A2000 it works great, but in A2003 the background doesn't always
change and when it does it only changes when the record looses the
focus.
Any way around this? Is it a bug? Or have they "improved" it?
|
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 expressions are the same for all controls
Under some undetermined circumstances, when such subform is displayed, the
controls on the subform start to visibly flicker, the cursor in the subform
stops blinking, and CPU utilization goes to 100%....
|
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 on white, the third on gray etc
etc.) I could write an expression based on the odd/even status of the
primary key but this wont work when sorting and filtering is applied.
Any suggestions gratefully received.
|
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 screen. I would like to change the font-size and
the set the background color, the foreground color of the text, and also
set a border color and width.
| |
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 6, this control in .NET do not apply the
expected formatting when there are multiple selection of different font
formats.
For example, if I select a text that have portions in Bold and other portion
|
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
perfectly. However, I have code that runs under the ON CLICK event. The
code changes the focus to other controls, which means the conditional
formatting is no longer displayed. This part makes sense to me.
Here's what doesn't make sense. The last...
|
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 setting
HTMLEncode to false in order for the format string to apply.
But I can't figure out how to apply formatting when I have a column
that is a templated field. The EditItemTemplate is a text box and the
ItemTemplate is a label, but when I look at...
|
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 of the arrays return dates. However, the dates get returned in both US and UK formats. Is there a way to apply formatting at this stage? Formatting later is too late as the date format is already corrupted.
Workbooks.OpenText...
|
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 each tab and apply autowidth to columns and apply autofilter to the first row of every tab in the workbook. I've this down
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |