i need to do update images in my site without doing post back in a page.So, i loaded the images in ad-rotator to toggl between images.
I also used the timer tick function to refresh the images in the ad-rotator.
But while timer tick function refresh the whole page is refreshed so that all functions that i declared in the page is reloaded.
i need to only images in the ad-rotator images should refresh not the whole page.
i need to avoid whole refresh of the page. Pls help me.
$(document).ready(function() {
setInterval(function() {
$('#<% = addrotat.ClientID %>').load(location.href + ' #<% = addrotat.ClientID %> ', '' + Math.random() + '');
}, 5000);
});
You need to use ajax, by using Update panels with proper triggers, update panel Enables sections of a page to be partially rendered without a postback.
you can check this links
update panel, with Triggers,
Updatepanel documentation
example for adrotator without refreshing the page