我在 控制台 程序下 可以用
console.write( "{0:D5} ",1)
输出 00001
为什么asp.net 下
response.write(String.Format( "{0:D5} ",1));
就输出1 啊?
------解决方案--------------------------------------------------------
//改成这样。。。
string value = 1.ToString().PadLeft(5, '0 ');
response.write(value);
------解决方案--------------------------------------------------------
Response.Write(String.Format( "{0:D5} ", 1));也是输出 00001