Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


format string on gridView boundField

Posted on 2006-06-05
Medium Priority
Last Modified: 2008-01-09
What is the correct dataformat string to display a number with exactly two numbers after the decimal point, with a percent sign after it, ie,

Question by:ARACK04
LVL 16

Accepted Solution

Edwin_C earned 1000 total points
ID: 16839389
LVL 27

Assisted Solution

Sammy earned 500 total points
ID: 16840063
I think you have to have htmlencode="false" in order to accomplish the format
<asp:boundfield datafield="YourColumName" dataformatstring="{0:0.00%}" htmlencode="false" />

Good luck
LVL 12

Assisted Solution

deanvanrooyen earned 500 total points
ID: 16840715
also set applyformateditmode true if needed

keep html encoding to true unles you are embeding html tags - false is unsafe.
% formating is set with P

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question