Re: Formatting not apply



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" <esperanza222@xxxxxxxxxxx> a écrit dans le message de
news:%23uNnRFP9FHA.3908@xxxxxxxxxxxxxxxxxxxxxxx
> 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}",dtrProduitVIPComposantPrix["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
>
>


.



Relevant Pages

  • Re: Getting Client Date Format
    ... It looks like to me you let the use whatever format he wants. ... impose and enforce the date format to be used possibly based on a the user preferred language stored in your site database ... Patrice ... >> I need to get the client Date Format and compare it to Server Date Format ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: formatting dates
    ... of a Label control. ... I want to format the date and time so it uses the date ... Mike Brind ... MVP ASP/ASP.NET ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Graphic format and file size
    ... > version XI) convert this format to .bmp because the report file without ...
    (microsoft.public.vb.crystal)
  • Re: Format Function
    ... > (Custom formatting strings) ... >> I'm looking for a way with either Format, ... >> be distracting for the user to read through) ...
    (microsoft.public.dotnet.framework)
  • Re: Format Function
    ... > (Custom formatting strings) ... >> I'm looking for a way with either Format, ... >> be distracting for the user to read through) ...
    (microsoft.public.dotnet.framework.aspnet)

Loading