You say it works on VS on your Machine but not on the server is this correct
?
Well, one think i can tell you is that there is a property for the
DataField's on the GridView called htmlEncode and if this is set to True,
then your format string will be ignored completely. It may be that there is
a difference between the aspx page on your local machine and the server,
this is the most likely difference.
On 29 Mar, 05:11, jonefer <jone...@discussions.microsoft.com> wrote:
> Is their any particular reason (server or design?) why the following line
> won't work on some servers?
[quoted text clipped - 24 lines]
> If not, what causes the server to completely ignore the
> DataFormatString="{0:#%}" ?
Hi
I don't know why there should be any difference between the server to
the development machine (I doubt it has anything to do with
restrictive settings) but there is a standard numeric format specifier
for percentages in ASP.NET.
Try "{0:P0}" which will muliply by 100, round to the number of decimal
places specified (in this case 0) and add the % symbol.
HTH
jonefer - 30 Mar 2008 03:45 GMT
now that --was helpful.
Another thing that seems to work is to set the field as an item template.
> You say it works on VS on your Machine but not on the server is this correct
> ?
[quoted text clipped - 46 lines]
>
> HTH