Hi Kiran,
Few questions, just to clarify couple of things in your scenario.
1. Can you see the button, repeating itself for each ad?
2. Try clicking the last 'view ad' button and does anything happen?
3. Please, change the code in your button handler to the below line and let me know what happens.
Response.Redirect("login.aspx");
Cheers