Vineet Kumar Saini

Vineet Kumar Saini

  • NA
  • 10.4k
  • 7.4m

LightSwitch

Nov 6 2011 7:18 AM
HI.....


How to format data on screen in visual studio lightswitch 2011 ?



Thanks..

Answers (1)

0
Pradeep Shet

Pradeep Shet

  • 322
  • 5.3k
  • 4.4m
Jan 16 2015 3:33 AM
This will not change in MVC4, it is a concept of C# language. So according to me 

string d = "2.4444".ToString("f2");

string.Format("{0:0.00}", "2.4444");


Hope this helps you. Mark it as answered
0
Vulpes

Vulpes

  • 0
  • 96k
  • 2.6m
Jan 14 2015 6:50 PM
I don't know whether it's different in MVC4 to any other type of .NET application but, if 'd' is  any number, the following C# expression will express it as a string to 2 decimal places:

   d.ToString("F2")