该网页将不会显示我的图像,并且会显示损坏的图像图标,该图像与web-dev文件夹中的index.html位于同一目录中,代码如下:
[js] uncaught exception: TypeError: map.has is not a function : test@test.js:3:9
答案 0 :(得分:2)
尝试使用protected void ExportToExcel(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=UserExport.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
TableCell cell;
using (StringWriter sw = new StringWriter())
{
HtmlTextWriter hw = new HtmlTextWriter(sw);
//To Export all pages
GridView1.AllowPaging = false;
this.BindGrid();
GridView1.HeaderRow.BackColor = Color.White;
foreach (TableCell cell in GridView1.HeaderRow.Cells)
{
cell.BackColor = GridView1.HeaderStyle.BackColor;
}
foreach (GridViewRow row in GridView1.Rows)
{
row.BackColor = Color.White;
for(int i = 0; i < row.Cells.Count()-2; i++)
{
cell = row.Cells[i];
if (row.RowIndex % 2 == 0)
{
cell.BackColor = GridView1.AlternatingRowStyle.BackColor;
}
else
{
cell.BackColor = GridView1.RowStyle.BackColor;
}
cell.CssClass = "textmode";
}
}
GridView1.RenderControl(hw);
//style to format numbers to string
string style = @"<style> .textmode { } </style>";
Response.Write(style);
Response.Output.Write(sw.ToString());
Response.Flush();
Response.End();
}
}
代替"
。
赞:
”
答案 1 :(得分:1)
尝试一下-
<img src="images1.jpg" alt="images1" width="100" height="100" />