Hi All,
My requirement is like displaying random advertisements in masterpage. I had a page with Ajax Timer control which on Timer_Tick event fetches me a new image and bind to <asp:hyperlink>, my problem is on page_load also i want to display image, but image is displayed only on Timer_Tick after some fixed 3000 seconds is elapsed. On page_load i want to display same images, my images are dynamic comes from database, i store them in a dataset, and binds to asp:hyperlink on timer_tick. Can anyone help, on how to display image on page_load, is there any way how i can attach the server side event (Timer_Tick) on page_load also, so that it will fetch me the image.
Thanks In Advance,
Karthikeyan.
What is wrong with putting your code on Timer_Tick into a function. Then call this function within Timer_Tick and also call this function on Page_Load.
Or set the interval very small so it fires when the page is loading. Then after the _First_ call to Timer_Tick set the interval to 3000 seconds.
Does that help?
Regards,
Al
No comments:
Post a Comment