teisipäev, 8. juuni 2010

ScriptManageri EnableHistory="true" töötamine IE8 peal

Kõik nagu õieti tehtud

<asp:scriptmanager id="ScriptManager1" runat="server" enablehistory="true" enablesecurehistorystate="true" >
</asp:scriptmanager>


aga IE8 peal hakkab kisama selliseid vigu, kollane hüüumärk all vasaskus servas

Sys.InvalidOperationException: For the history feature to work in IE, the page must have an iFrame element with id '__historyFrame' pointed to a page that gets its title from the 'title' query string parameter and calls Sys.Application._onIFrameLoad() on the parent window. This can be done by setting EnableHistory to true on ScriptManager


Vea põhjus seekord see , et ASPX lehel DOCTYPE määrab lehele HTML 4.01 direktiivi
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

aga vaja läheb XHTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">