jump to navigation

DataFormatString en ASP.NET 20 Octubre 2006

Posted by joelperez in ASP.NET, Programacion.
trackback

DataFormatString = “{0: Format Pattern }”

Format Pattern Name Example
C or c Currency format $2,003.05
D or d Decimal format
(Works for integers only!)
2,003
E or e Scientific (exponential) format 2.003052e+003
F or f Fixed-point format 2003.05
G or g General format 2003.0515
N or n Number format 2,003.05
P or p Percent format 2,00305.15%
X or x Hexadecimal format
(Works with integers only!)
7D3

Comentarios»

1. Luis Muñoz - 29 Diciembre 2006

DataFormatString se aplica solo a numeros y fechas?

2. erick - 18 Octubre 2007

cuando modificas los registros en el rowdatabound
Continua con el dataformatstring activo????? bueno ami no me sale nada me pdria ayudar

3. lizandro - 22 Octubre 2008

Hola necesito imprimir un numero entero con el formato inclusive con 2 decimales 1569 con formato 1569.00, si alguien me puede ayudar se lo agradesco

4. asdas - 18 Marzo 2009

3. lizandro – 22 Octubre 2008

Hola necesito imprimir un numero entero con el formato inclusive con 2 decimales 1569 con formato 1569.00, si alguien me puede ayudar se lo agradesco

si pone F….de fixed

5. Carlos - 20 Junio 2009

asdas para que te salga este formato solo pon esto {0:0.00} y ya esta copialo y lo pegas con las llaves

6. Carlos - 20 Junio 2009

pero recuerda desactivar la opcion HTMLEncode ponlo en FALSE