Click here to Skip to main content
14,266,769 members
Rate this:
Please Sign up or sign in to vote.
See more:
can anybody please help me.

i want to show image on first page request not in others

actually my question is ,suppose i have 5 pages p1,p2,p3,p4,p5.

i open p1 page then image will show on p1 not in others,if other will open p5 then it will show on p5 not in others.
Posted
Updated 7-Jul-14 17:21pm
v2
Comments
DamithSL 7-Jul-14 23:25pm
   
what if first time user open p1, then close that page and open P4?
what is user open P1 and next P2 and P3, then close P1 and open P4?
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can use the Page.IsPostBack property. http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback(v=vs.110).aspx[^]

It will be false the first time you load and true when the page posts back.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

if your users are some-how loged in you can keep track of what pages they visited and show appropriet image.

If your users are not log in you can use local/sessions storage, cookies, etc.... to save their state(what pages they visited) and based on that show images.

If you would have trouble to implement any part of that just write what exactly is not working and I will try to help ;)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100