Re: Formatting not apply



It's working (both)!!
Thank you so much !!
Esperanza

"Patrice" <nobody@xxxxxxxxxxx> a écrit dans le message de
news:eJkqkYP9FHA.1292@xxxxxxxxxxxxxxxxxxxxxxx
> 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: Quick Ctype Question
    ... Basically its showing how to use the format of the binding to upper the name ... vs using the CType function. ... Every object has a ToString() method. ... For a String object, ToString ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Quick Ctype Question
    ... and then the sub underneith it is as follows: ... Basically its showing how to use the format of the binding to upper the name ... Every object has a ToString() method. ... For a String object, ToString ...
    (microsoft.public.dotnet.languages.vb)
  • Re: String.Format vs + operator
    ... With Format, the format ... string is parsed, and that is going to require some overhead. ... versus the readability/maintainability of the code, ... ToString() will automatically be called on other parts as well. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Guid.NewGuid - character
    ... I assume you mean if you call ToString() on the generated Guid. ... The format of the string returned by guid.ToStringis xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. ... Browse into any of the overloads that take in a format string to see the different formats that could be returned. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: String.Format vs + operator
    ... With Format, the format ... string is parsed, and that is going to require some overhead. ... versus the readability/maintainability of the code, as I think that the call ... If any of the parts of a string concatenation contains a string literal, ToString() will automatically be called on other parts as well. ...
    (microsoft.public.dotnet.languages.csharp)