Control page flow in ASP.Net 1.0 and 2.0

C

Coleen

Hi All :)



I have a general question about controlling page follow and if there is a better way to do it than I am currently using in ASP.Net 1.0 - we are getting ready to move to 2.0, so if there's a better/easier way in 2.0 that's great.



What I'm doing is creating a Session variable for each page to identify that page when it is requested from a directory, I set the Session("page_name") for the page called and pass that to the next page until I need to call a different page and then change the page_name as needed.



I know that there has to be a better way to do this, and this leads to problems if the user wants to use the drop-down JavaScript menu instead of click on the Next buttons. I need a way to uniquely identify which page is called from where, and pass that ID depending on which page is called.



Any suggestions would be greatly appreciated, or if you can point me to where I can find good documentation on how to do this without using session variables, I would appreciate it. TIA,



Coleen
 
P

Patrice

I'm not sure what is the exact problem. If this to have a convenient way to
get the current page, try Request.Path

--
Patrice

"Coleen" <[email protected]> a écrit dans le message de
%[email protected]...
Hi All :)



I have a general question about controlling page follow and if there is a
better way to do it than I am currently using in ASP.Net 1.0 - we are
getting ready to move to 2.0, so if there's a better/easier way in 2.0
that's great.



What I'm doing is creating a Session variable for each page to identify that
page when it is requested from a directory, I set the Session("page_name")
for the page called and pass that to the next page until I need to call a
different page and then change the page_name as needed.



I know that there has to be a better way to do this, and this leads to
problems if the user wants to use the drop-down JavaScript menu instead of
click on the Next buttons. I need a way to uniquely identify which page is
called from where, and pass that ID depending on which page is called.



Any suggestions would be greatly appreciated, or if you can point me to
where I can find good documentation on how to do this without using session
variables, I would appreciate it. TIA,



Coleen
 
C

Coleen

The problem is 1) using Session variables is resource consuming when you have to use lots of the (there are about 40 pages in this application) and every page has to have a page_name (ID); and 2) If the user tries to use the JavaScript dropdown menus instead of the Next button to navigate from page to page, the Session variable is not passed correctly causing a runtime error!



I need a way to pass the ID of a page (does a page automatically get some sort of ID in ASP.Net? I can't find any info on this in my reference books) and if it does, how can I pass that ID instead of using the session variable page_name that I have created?



What is Request.Path? Does it pass a page ID? Please let me know where I can find more info on this, and if it will do what I need...

Thanks!



Coleen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top