Wednesday, March 28, 2012

Posting On Ajax Help Required.

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.

Consider using the AdRotator control.

The AdRotator control selects and displays an ad randomly each time a page is refreshed.

The AdRotator control in ASP.NET 2.0 populates its image and navigation properties in 3 different ways -
Database, XML and also programmatically.

Check these links for more info & code samples -
http://www.ipona.com/samples/0321257278/11/AdRotator-Bound.aspx
http://www.ipona.com/samples/0321257278/SourceViewer/SrcView.aspx?file=/samples/0321257278/11/AdRotator-Bound.aspx
http://www.c-sharpcorner.com/UploadFile/mahesh/adrotator06142007110621AM/adrotator.aspx
http://blogs.msdn.com/acoat/archive/2005/11/07/AdRotator-Dynamic-Image-Generation.aspx


Thanks for your valuable suggestion, but my requirement is i don't want to do a postback for whole page, just for banner, what i want is to do a Asynchronous postback on fixed timer interval and change banner. First time when the page load there is no banner getting displayed. This is my problem, is there any way through which i can again call Timer_Tick event in page_load so that for the first time a image will be loaded.

Thanks & Regards,

karthikeyan.

No comments:

Post a Comment