Solve the problem that ReportViewer cannot be displayed normally in CHROME

The default document definition for new ASPX pages in vs2010 and before is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

At this time, ReportViewer is displayed normally in IE, but cannot be displayed normally in CHROME. Modify the document definition to HTML4.01:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

ReportViewer is displayed normally in CHROME, but not fully displayed in IE10. Modify the document definition to HTML5:

<!DOCTYPE HTML>

ReportViewer displays normally in IE, but not in CHROME. Referring to the method in " ReportViewer cannot be displayed in Chrome browser " , it is found in practice that it is only necessary to set the property SizeToReportContent of ReportViewer to True, so that the page can use HTML5, and the report can also be displayed normally in IE and CHROME at the same time. .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325489263&siteId=291194637