导航问题 [英] problem in navigation

查看:97
本文介绍了导航问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在orkut之类的社交网站中,我们使用用户名登录....
如何导航到一个个人资料到另一个个人资料并返回我们的个人资料.我在导航项目中遇到一个问题,从一个用户帐户到另一个返回自己的用户帐户.
什么有助于从一个用户帐户导航到另一个用户帐户.... plz描述它........
感谢

in social networking website like orkut we login with our username....
how it possible to navigate to one profile to other and returns to ours profile. i am facing problem in my project in navgation frorm one useraccount to other return to own useraccount.
what helps to navigate to from one useraccount to another.......plz decribe it ........
Thanks

推荐答案

假定一个URL,该URL以ID作为查询字符串之一,该查询字符串决定了要放宽哪个配置文件. (每个配置文件都分配了唯一的ID).

现在,在设计网站时,请保留首页"链接,该链接已将内置登录用户的ID分配给重定向URL.休息,只要您访问任何其他人的个人资料,当您选择其他人时,请将该人的唯一ID附加到URl即可进行重定向.

更新:对不起,没有代码,直到您尝试建议的内容!现在,您在这里询问的内容是:对于唯一字段,用户ID是数字,通常是一种.在您的会话中维护登录用户.您可以使用querytstring传递已浏览用户的用户ID.使用querystring加载浏览的用户配置文件,并使用会话加载登录的用户配置文件.

更新2:假设对于浏览的用户ID,我们有一个名为"browsedUserId"的查询字符串.在页面加载中,只需检查查询字符串"browsedUsedId".如果存在,请加载此ID的配置文件.否则,加载使用您会话中存储的用户ID登录的用户的配置文件.
Assume a URL that takes an ID as one of the query string that decided which profile to looad. (Each profile has unique ID assigned).

Now, while you design the website, keep a ''Home'' sort of link that has inbuild loggedin user''s ID assigned to the redirect URL. Rest, whnever you are visitng any other person''s profile, when you select other person, attach that person''s unique ID with the URl for re-direction.

UPDATE: Sorry no code, until you try what is being suggested! Now about what you asked here: For unique fields, userid''s are the one generally used as they are numbers. Maintain the logged in user in your session. You can use querytstring to pass on the userid of the browsed user. Use querystring to load browsed user profile and use session to load logged in users profile.

UPDATE 2: Lets say for the browsed userid, we have a query string named ''browsedUserId''. In your page load, just check for the querystring ''browsedUsedId''. If it exists, load the profile of this id. Or else, load the profile of user logged in using userid stored in your session.


这篇关于导航问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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