mvc中使用iframe加载htm乱码
Layout文件头部:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="gb2312" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
View文件内容:
@{
ViewBag.Title = "View";
Layout = "~/Views/Shared/_Help.cshtml";
}
@*<h2>View</h2>*@
<iframe style="border:none" src='../File/Document/SOD.htm' width="100%" height="700"></iframe>
htm文件头部:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name="Excel Workbook Frameset">
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 12">
<link rel=File-List href="SOD.files/filelist.xml">
这个htm是用excel转的,单独用浏览器打开可以正常显示,但是放在iframe中加载就会乱码,不知道还有什么地方需要设置字符集吗?求解~~~~~~