Reputation: 13
How i can Refresh Iframe in ASP.NET, i need every time change source in iframe Page load work see example:
document.getElementById('frame1').setAttribute('src', 'Questionair.aspx');
every time i need go to 'Questionair.aspx' page and execute page load, in my code this source change and page load execute one time thank you
Upvotes: 0
Views: 1779
Reputation: 6802
You can reload the source of IFrame by first setting the 'src' attribute and then calling location.reload method:
document.getElementById('frame1').setAttribute('src', 'Questionair.aspx');
document.getElementById('frame1').contentWindow.location.reload(true);
Upvotes: 1