Direct-linking

I' m a little confused... I clicked on the link and it took me to the product (not that I understand what the product is of course?)
 
oh right I see I get it now. Do you use sessions? If so this is probably the problem. Maybe you can check on every page to see if a session is being used, otherwise create one. Maybe even store the last used session in a cookie, so that the user is redirected to the main page if they are unknown, otherwise they can continue browsing where they last bookmarked themselves...
 
yes. i do use sessions. but how do i check if a session exist? and how do i start one if doesn't exist. i guess i would have to start a session on the products page, cause now it only starts a new session using global.asax when the user hits my startpage (default.aspx). How do i start a session at produkter.aspx when thats the first page the user visits?

.tim
 
session's are a bit out of my range, but this is what I know.

You must check to see if a session exists to use information from it. I assume you already do this. Then you just check to see if it's null or nothing, and if so redirect the user back to the main page.

for starters anyway. Thats the theory, I'm sorry I can't help with the details.

anyone?
 
thank you
well...i don't want to redirect the user to the main-page. because they have to be able to go directly to a product from f.ex. a google link. so i would have to start a new session on the products page.
anyone who could help me?

.tim
 
You shouldn't be creating the session solely on the main page. That defeats the whole purpose. A session should be created when the user requests the first page (regardless of which page it is), and should "travel" with the user as he or she moves from page to page.
 
hi!
i know, but how do i do that?
the way it is now, the user gets a session from the main page that travels with him while he shops. How can i make the session start regardless of which page the user hits first?

.tim
 
<sessionState
mode="InProc"
cookieless="false"
timeout="30"
/>

this is from my web.config
is this correct?

thanks

.tim
 
Thank you.
It figured it out now, just a stupid thing as always.
The header.ascx that's on all my pages pages asked for a variable from session that wasn't there....

So that's ok now. One more question:
When the user presses "enter" in the password field the prg starts the search function on the left side instead of login-function in the "logg inn" button below the field (http://www.elefun.net/aspx/login.aspx). How can i decide what button to press when the user hits "enter" in a textfield?
 
Back
Top