The string.format tag has no wiki summary.
0
votes
0answers
4 views
Formatting Html strings to be used in HtmlHelper extensions -MVC
I wrote an extension method :
public static string XDropDown(this HtmlHelper helper,string name, string optionLabel,object selectedValue)
{
StringBuilder b = new StringBuilder();
...
1
vote
0answers
23 views
paging for string.format in asp.net
I How to paging for string.format. I just like paging In Gridview.
For example, there are 20 100 records per page and the rest of the layout.
preview 1 2 3 4 5 next
using (var cmd = ...
0
votes
0answers
11 views
About clone substring and format
I discover a problem with the code below :
public List<LigneColonne> justify(int lrg) {
ArrayList<LigneColonne> aLignes = new ArrayList<LigneColonne>();
[...]
String sjustified = ...
0
votes
1answer
25 views
New Zealand Bank Account Format Display
I am to display New Zealand and Australian bank accounts in reports, formatted according to a custom format supplied by the user. For example, NZ bank accounts can be 00-0000-0000000-000 with the last ...
1
vote
5answers
55 views
Converting Number to Comma Seperated Values
I Need to convert numbers in comma separated format to display in C#.
For Example:
1000 to 1,000
45000 to 45,000
150000 to 1,50,000
21545000 to 2,15,45,000
How to acheive this in C#?
I tried the ...
3
votes
1answer
38 views
Specify decimal places for all placeholders with String.Format
With String.Format syntax, I know that I can format doubles with a set number of decimal places as follows:
String.Format("{0:F8}", 0.123456789);
That's fine for most cases, but I'm writing a ...
0
votes
3answers
67 views
Why string.format? [duplicate]
Why shouldn't we simply use
string s=product.Name+" has been saved";
instead of:
string s=string.Format("{0} has been saved", product.Name);
0
votes
1answer
24 views
0.%d range between 0-100 is the same as 100-1000
I have the command:
string.format("movel(p[0.%d,- 0.%d, 0.%d, -0.5121, -3.08, 0.0005])"+ "\n", averageX1, averageY1, averageY2 )
Where average value can change from 0 to 700. When the value is
...
1
vote
1answer
61 views
String.Format in C#
I have an values like
1,000
25,000
500,000
Need to convert above values as like below without comma
1000
25000
500000
How to acheive this in C#?
how to get reverse output of this -
...
3
votes
2answers
81 views
Lua string.format %c versus string.char
Should Lua string.format( "%c", value ) be equivalent to string.char( value )?
It seems not when character value is zero.
string.format( "%c", 0 ):len()
returns 0
string.char( 0 ):len()
returns ...
2
votes
1answer
55 views
Overloaded methods give “Method with optional parameter is hidden by overload” warning in Resharper
I have a few C# apps that do logging, and the Output method has an overload to accept the message and a StreamWriter, and another overload with an additional parameter for a params array. An example ...
2
votes
2answers
55 views
Display a number with culture info but without formatting
I thought this was simple; the .Net Framework has so many functions for formatting a number exactly as you want, but still, I haven't been able to make this work.
The problem: display a number ...
3
votes
2answers
78 views
string.format(format,doubleValue) , precision lost
I have this double value:
var value = 52.30298270000003
and when I convert it to string, it losses its precision:
var str = string.Format("{0} some text...", value);
Console.WriteLine(str); // ...
0
votes
0answers
40 views
Date format mismatching in asp.net if different format is set while installing system
I have used jquery based datepicker,
For demo consider below link:
Link: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerClickInput.html
While loading the Page I have set the ...
0
votes
2answers
85 views
C# - format specific number using format.string in runtime (live) on texbox
i made code to format number when total lengh is == 11, it run on texbox change, but only format when it have 11 characters, i would like to make it on runtime (live), understood ? Its possible ? See ...