Click here to Skip to main content
16,018,318 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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.
 
Share this answer
 
v3
Comments
aryan2010 9-May-10 7:05am    
can u describe ur what u want to say.... i hv two unique fields username and userid... and i want the navigation using session and query string. Is it possible using both session and querystring... if u not mind can u describe using code...... [SM]: 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.
aryan2010 9-May-10 23:56pm    
Hello.....
Sandeep..........
I able to redirct using the userid ..
i am facing problem which code should i write in the page load so that the profile of that person which the signed person visiting will open and when he return to his own profile will open....
the main problem is not the redirecting ...the main problem is opening of profile of the right person ...
and calling the code in page load event so that desired output come........
Thanks
aryan2010 10-May-10 0:44am    
sandeep......
my problem is comparing the value of userid stored in the session and in the querystring.....
so that the profile of right person will open.......
when we visit other profile if he added me as he has added the person who hv signed in ....
and he clicked on his snap then his userid is stored in the and he will be redirected by respose.redirect according to his userid .........
then in taht case what code will be write so that his profile again open.....
thanks

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900