How to insert a banner ad between records on the List page |
1/16/2014 5:56:11 PM |
ASPRunnerPro Tips and tricks | |
admin
Lets say you run a free classified ads website. You need to insert some paid ads like banners or Google adwords between your free ads. Here is how you can do this.
{BEGIN grid_row}
{BEGIN showheader}<TR>
Session("rec_count")=0
if SESSION("rec_count")=5 then |
|
G
|
gonzalosb 2/19/2014 |
it is possible to show more than 1 paid add and alternate every time the page is reloaded or refresh ? |
admin 2/19/2014 | |
Yes, it's possible. The simplest form - you have a hardcoded list of banner images and links, say five banners. When it comes to displaying the banner you pick a randmon number ranging from 1 to 5 and display that banner. See examples of generating a random number at http://www.w3schools.com/vbscript/func_rnd.asp |