Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 12-06-2005, 07:32 AM Back a page
Skilled Talker

Posts: 95
Trades: 0
Hi all,

Is there any way i can get a page to automatically take me back a page?

By this i mean, back a page as if i clicked the back button, not a response.redirect

I have three pages.

Page one a form with a list box: select a databse from the list ->go to 2nd page

2nd page. Displays a list on the left of users with access to databse from page one. Also has a txt box that allows new users to be added. - >page 3

page3. Adds or deltes user. this page i want to return to page 2 with the refreshed list. this works if i click the back button and refresh, but if i use. response.redirect it looses the databse selection form the first page.

Hope that helps.
higginbt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-06-2005, 07:35 AM
Skilled Talker

Posts: 95
Trades: 0
p.s i've also used the meta tag thats doesnt work either
higginbt is offline
Reply With Quote
View Public Profile
 
Old 12-06-2005, 05:20 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
3 conditions exist

condition 1 = page is loaded up initially
condition 2 = database has been selected
condition 3 = username is being added/deleted return to condition 2

the best way is to just use one page and check for these condition and execute the appropriate code. 3 pages are simply not required.

example:
pseudocode
Code:
 if request.form("database") <> "" then
      ' set flag to select and display users from database
         if request.form("delete") <> "" and request.form("selected") <> "" then
           'run code to delete user 
         end if
        if request.form("add") <> "" then
        '            run code to add the username
        end if
  else
'    run code to show database list
  end if
replace the element name with the one from your fields. make sure the "database" value is returned in a form element when delete or add is clicked.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-07-2005, 05:12 AM
Skilled Talker

Posts: 95
Trades: 0
I know i dont need 3 pages but the users want it that way for a simple interface. Breaking down the tasks.

Task one , Page one. Select from a list of databases
task two Page two view/add/del user from the select database.
Task3 3 page 3 Actually write to database return user to page two with updated list.

Anyway i've got it working now with cookies that time out.
so thanks for the help.
higginbt is offline
Reply With Quote
View Public Profile
 
Old 12-12-2005, 11:15 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
How are you passing which database the user selected from page 1 to page 2? For example query string:
page2.asp?database=7

On page2, pass that value to page 3 as well as whatever values you're already passing, maybe a User ID or something..

page3.asp?UserID=4&database=7

Then on page 3, once done, just redirect them back to page 2 passing the query string:

Response.Redirect("page2.asp?database=" & Request.QueryString("database"))

This could also be done by storing the database ID in a session variable on page 1, then you can use it throughout the session.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to Back a page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27594 seconds with 12 queries