I'm trying to embed google docs viewer in my page. Here's the test.aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Web_Application.test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<iframe id="documentLoader" src="https://docs.google.com/viewer?embedded=true&url=http://view.samurajdata.se/license.pdf"
style="width:100%; height:800px;">
</iframe>
</body>
</html>
Here's my test.aspx.cs
namespace Web_Application
{
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
I get errors such as
'Line: 409
Error: Unable to get value of the property 'k': object is null or undefined'
or
'Line: 458
Error: Unable to get value of the property 'a': object is null or undefined'
which are from google doc viewer online javascript resource...
So I embedded the script in the header and it worked. But the problem is, if I do this in a user control or in a page inherited from a master page I get those errors again.
How can I solve this?
Thank you.