想要在第一页请求上显示图像 [英] want to show image on first page request

查看:76
本文介绍了想要在第一页请求上显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我。



i希望在第一页上显示图像而不是在其他人请求



实际上我的问题是,假设我有5页p1,p2,p3,p4,p5。



i打开p1页面然后图像将在p1上显示而不是在其他页面上,如果其他将打开p5然后它将显示在p5而不是其他。

解决方案

您可以使用Page.IsPostBack属性。 http://msdn.microsoft.com /en-us/library/system.web.ui.page.ispostback(v=vs.110).aspx [ ^ ]



首次加载时为false,页面回发时为true。


如果您的用户在某些方面,您可以跟踪他们访问的页面并显示appropriet图像。



如果您的用户没有登录,您可以使用本地/会话存储,cookie等....来保存他们的状态(什么页面)他们参观了这个节目图片。



如果您无法实现其中的任何部分,只需写下究竟不起作用的内容,我会尽力帮助;)

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.

解决方案

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.


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 ;)


这篇关于想要在第一页请求上显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆