首页 新闻 赞助 找找看

string.Format 报错。提示 输入字符串的格式不正确

0
[待解决问题]

string a= string.Format(@"
.preloader {
background-image: url('/Images/Custom/pager-background.png');
width: 0px;
height: 0px;
display: none;
}

body {
background-color: White;
}

.date-type {
display: none;
}

.inputTime {
width: 95px !important;
cursor: pointer;
}

.ui-jqgrid-hbox {
margin-left: -1px !important;
}

.ui-jqgrid .ui-icon {
right: 2px !important;
}

.ui-th-column-header {
border-bottom: 1px solid #dddddd;
}

.formSearch {
display: inline-block;
padding-left: 10px;
}

.form-inline2 {
padding: 10px 20px 10px 10px;
}

.timeClass {
display: inline-block;
}

.Wdate {
width: 150px !important;
}

#Report_main {
background-color: White;
width: 800px;
padding: 8px 8px 8px 8px;
}

.text_TextArea1 {
width: 100px !important;
height: 20px;
overflow: hidden;
border: 0px;
background-color: #fff;
}

.MsoNormal {
margin-bottom: .0001pt;
text-align: justify;
text-justify: inter-ideograph;
font-family: Calibri;
font-size: 10.5000pt;
margin-left: 0pt;
margin-right: 0pt;
margin-top: 0pt;
}

.MsoNormal2 {
text-indent: 24pt;
font-family: 宋体;
line-height: 150%;
font-size: 10.5000pt;
}

.MsoNormal3 {
text-indent: 24pt;
font-family: 宋体;
line-height: 150%;
font-size: 10.5000pt;
font-weight: bold;
}

.tableClass {
background-color: transparent;
border-collapse: collapse;
border: 2px solid #000;
border-spacing: 0;
color: #000;
font-family: 'Microsoft Yahei', '微软雅黑', '宋体', 'Simsun', 'Open Sans';
line - height: 15px;
margin: 0px 0px 0px 0px;
table - layout: fixed;
text - align: center;
width: 100 %;

}

.tableClass th {
background - color: #fff;
border: 2px solid #000;
font - size: 14px;
font - weight: bold;
height: 20px;
line - height: 20px;
}

.tableClass td {
background - color: #fff;
border: 2px solid #000;
border - spacing: 0;
font - weight: normal;
height: 20px;
line - height: 20px;
}

.GDWJQLXTJB thead tr th {
width: 8.9 %;
}

.GDWJQLXTJB thead tr th {
text - indent: 0px !important;
}

.GDWJQLXTJB tbody tr td {
text - indent: 0px !important;
}

.GDWJQXZTJB thead tr th,.JQMXB thead tr th {
width: 16.6 %;
}

.JQMXB thead tr th.classXH {
width: 5 %;
}

.JQMXB thead tr th.classBJNR {
width: 27 %;
}

");

斌言的主页 斌言 | 初学一级 | 园豆:191
提问于:2018-06-15 15:46
< >
分享
所有回答(2)
0

这种{}的花括号会让它误以为是{0}{1}{2}这种参数的

王家小西 | 园豆:204 (菜鸟二级) | 2018-06-15 16:12

写{{}},两个的

支持(0) 反对(0) 王家小西 | 园豆:204 (菜鸟二级) | 2018-06-15 16:16
0

又没有参数,干嘛要format啊。直接 string a= @"xxx";

五星 | 园豆:125 (初学一级) | 2018-06-17 15:10
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册