2012-02-22 10 views
0

ReportViewerを使用して、.aspxページのSSRSレポートを表示しています。 このreportviewerはブラウザにiframeとして表示されるため、 iframeが読み込まれるたびにjavascript関数を呼び出す必要があります。asp.netでiframe onloadイベントを取得する方法

I can't use window.onload because the content of reportviewer that is iframes get changed without any postback. 

答えて

3

ない私は、レポートビューアーを使用したことがないので、これは役立ちますが、あなたはサーバー側のページへのアクセス権を持っている場合は、次なければわから:あなたのjavascriptファイルで

protected void Page_Load(object sender, EventArgs e) 
{ 
    if (!IsPostBack) 
    { 
     MainIFrame.Attributes.Add("onload", "MainIFrame_OnLoad();"); 
    } 
} 

は、次の行を追加します。

function MainIFrame_OnLoad() { 
    alert('yes!'); 
} 
関連する問題