What is the DataFormatString of Boundfield under VS2005?

xiaoxiao2021-03-19  198

We know that you can format the output of Boundfield data with DataFormatString under VS2003 or even VS2005Beta:

<

ASP: Boundfield

Headertext

= "Displaytext"

Datafield

= "FieldName"

DataFormatString

= "{0: f2}"

>

<

ItemStyle

Horizontalalign

= "Right"

Width

= "60px"

>

ItemStyle

>

<

HEADERSTYLE

Horizontalalign

= "Right"

>

HEADERSTYLE

>

ASP: Boundfield

>

However, soon in VS2005, you will find DataFormatString from work.

At this time, HTMLENCode should be set at the same time, and DataFormatString will work:

<

ASP: Boundfield

Headertext

= "Displaytext"

Datafield

= "FieldName"

DataFormatString

= "{0: f2}"

HTMLENCODE

= "false"

>

<

ItemStyle

Horizontalalign

= "Right"

Width

= "60px"

>

ItemStyle

>

<

HEADERSTYLE

Horizontalalign

= "Right"

>

HEADERSTYLE

>

ASP: Boundfield

>

转载请注明原文地址:https://www.9cbs.com/read-130152.html

New Post(0)