How To Maintain Page Session???
I am currently working on an online shopping cart. The working is like:-
1. First the user selects the things.
2. Next page is the detail of the things that he has selected.
Now the third page allows the user to check his address..but before that he has to log in(if he is not logged in). and after logging in he must be redirected to the checkaddress page with his details intact.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Maintain Session State
I have been storing an object as session variable, such as set session("oRS") = Server.CreateObject("ADODB.Recordset") The page then redirects to another page. i need to use this object on the called page, but i encounter an error saying 'User session has expired.' On checking with the code, it was found that the sesion variable has not maintained its state for object 'oRS'. Although, session for string type variable are maintained.
Asp Session Maintain State
i have a form having hyperlink calling the same page.on click on hyperlink i am submitting form "Onclick=dosubmit(form1);" dosubmit{ document.form1.submit(); } but i am not able to retain session data.how can i retain session data.
How To Maintain Session State Using Hidden Fields?
I have a org tree with hierarchical display of employees built using classic asp and vbscript. I also have list of radio buttons for report names. I have 1 select box with dates in it. Then I click on the submit button to view the reports in Crystal. But when I come back, my org tree is now collapased I store the employee clicked (radio button), report clicked (radio button), date (drop down) in hidden fields on submit of the form. Now when I come back, how can I use these hidden fields to store the page state?
Maintain Values
1. i currentll have a form (html), which users will fill some infos. 2. when the user submits the form, it will go to login.asp, to validate if the user exists in the database. 3. if user exist it will redirect to main.asp, with all the infos supplied intact (hidden). how will i do this? can someone point me to a tutorial/article for me to learn this.
Maintain Version Number
We have developed an ASP application and I need to maintaind version number in the application. Earlier I was developing VC++ application and it is pretty straight forward to maintain version numbers.
Session Page
Iv'e made an attempt here to create a session once a user has logged in. Code:
New Session For Every Page?
I recently bought a new web server and am in the process of migrating all of our websites over. We're going from Windows 2000 IIS 5.0 to Windows 2003 IIS 6.0. I've been able to get everything to work correctly except for the SessionID's. For some reason I'm getting a new SessionID on EVERY single page that I visit! Which makes it quite difficult to login and add items to your cart...hehe. Everything is running ASP, there is no ASP.NET pages, I don't even have the 1.0 or the 2.0 Framework installed on the server yet. I verified that the Globals.asa is on the server on and config'ed correctly.
A Page Once Per Session
I have an index page containing several IFRAMES that hold a couple of apps which require logins. To avoid having to login 3 or 4 times when the index page first loads, I had the IFRAMES load a page with a link to click to actually go to the page requiring login. The issue I have is that after you've logged in to a couple of these pages, when you refresh the index page, all the IFRAMES go back to the link page. You don't have to log in again, but this makes you have to click the link again. What I'd like is a way to only show the link page the first time the index page loads it up, but after you've clicked on the link once and logged in, then the next time the index refreshes, you skip the link page and go straight to the app.
Session Lost Across Page
What could the likely cause of a session value being lost when one navigates to another page and attempts to write that session out: Page 1 session("u_name") = oRS.fields("u_name") Navigate to Page 2 Response.write Session("u_name") ....."_name" seems to be empty on Page 2. What am I doing wrong here?
MSXML.XMLHTTP / ASP Page / Session
I'm using the MSXML.XMLHTTP object to obtain the results of an ASP page from an ASP page on the same server. The problem I have is that when the AP refrenced by the XMLHTTP object is run it does now share the session with the calling page ? How can I solve this ?
New Session On Page Inside A Frameset
I have been using session variables to pass a user name from one ASP page to another inside framesets for 9 months and it stopped working this week. I have made no code changes but there was a "security update" installed on the server a few days ago but I can't find out exactly what it was. In the research I have done I found many articles on the subject of session variables in ASP pages inside framesets. From what I read a new session will be started every time a new ASP page is accessed until a session variable is set, once a session variable is set the session will stay the same from page to page, even when using frames. It is possible to start a session by setting a session variable in the global.asa file. My page 1 sets the session variable "username", this page calls page 2 which then uses the "username" variable. This still works on the two test servers I have where no upgrades of any kind have been done. I changed the code to display the Session.SessionID in both page 1 and page 2. On my test systems I get the same session id number, on my production system I get two different session id numbers and when I turn on prompting for all cookies I get the session cookie prompt when the second page is called. The two test systems are on the same network as my workstation, the production machine on the internet at a hosting site. I have cookies enabled in my browser, session state is enabled in IIS and there are no special characters in the domain name of the web site. I did not have a global.asa file so I added one and I set a session variable in the global.asa just to get the session started. What I find interesting is if I display the variable I set in the global.asa file I can see it on both page 1 and page 2 but on page 2 I can't see the variables set on page 1. I am completely stumped. Does anyone have any idea what I can do to get this working again? .....
ASP Session/Cookies, Help To Protect Page From Non Users
ASP Session/Cookies, Help to Protect Page from Non users I am a beginner and very urgently need some help I have created a asp page, that takes in a username and password and validates it as follows and then if true continues to the pages requested. Code: 'Read in the password for the user from the database If (((Request.Form("txtUser")) = rsCheckUser("User_pass")) and (rsCheckUser("User_lev") = 1) ) Then 'If rsCheckUser("User_level") = 1 Then 'THE ABOVE CHECKS THE INFO IS CORRECT AND IT REDIRECTS TO THE PAGE BELOW and Session=True 'If the password is correct then set the session variable to True Session("blnIsUserGood") = "True" 'Redirect to the authorised user page and send the users name Response.Redirect"user_self_update_form.asp?ID=" & rsCheckUser("ID") & "" 'Close Objects before redirecting Set adoCon = Nothing Set strCon = Nothing Set rsCheckUser = Nothing End If Now this code takes you to page :Response.Redirect"user_self_update_form.asp?ID=" & rsCheckUser("ID") & "" Which is something like /project/user_self_update_form.asp?ID=1 Since after the login you do to this, you are allowed to see this page. But The page user_self_update_form.asp?ID= can also be access if you just put the link on the browser. Lets say i log in as ID 2, and just change the ID to 3 on the address bar in the browser, i will log into someone elses page. How to i block this from random access and only the SPECIFIC USER? Code for user_self_update_form.asp (the protected page unless you are logged it): The Session = False part just does not work here, so if you get this link of someone, you can just get it, and you are not redirected. <% 'If the session variable is False or does not exsist then redirect the user to the unauthorised user page If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then 'Redirect to unathorised user page Response.Redirect"unauthorised_user_page.htm" End If %> <% 'Dimension variables Dim adoCon 'Holds the Database Connection Object Dim rsGuestbook 'Holds the recordset for the record to be updated Dim strSQL 'Holds the SQL query for the database Dim lngRecordNo 'Holds the record number to be updated 'Read in the record number to be updated lngRecordNo = CLng(Request.QueryString("ID")) and all the other protected into here:
Accept /decline Page - Session Cookies
I need help with setting up a page where the viewer has to accept terms before they can access the rest of the website. The page will have a bit of text explaining why they need to accept oor decline the terms and then have 2 buttons. ie. accept or decline. What I need to be able to do is set this up so that if the viewer tries to bypass the accept/ decline page they will get re-directed to it. If they have clicked the accept button then they can view anywhere on the site. I understand that 'sessions' in IIS don't actually close until about 20 mins after the user has left the site and can live with that. But if they come back the next day they must go through the accept/decline page to get into the site. It doesn't have to have usernames or password, they just have to accept. I understand that you set up several pages to do this, i.e. the accept/decline page, a 'checkterms' page (which sets the session cookie?) and then some code on every other page on the site to check for the presence of the session cookie and let you view if it is there. If not, redirects you to the Accept/Decline page. The problem I have is I don't know what code to write and where to put it into the page.
ASP Page Does Not Recognize Session & Request Variables.
I do contract work for an organization that has some of the word code I have ever seen. I think they are using some sort of screwy CMS or something. The code on their pages are pages stacked on pages, in other word one page loaded into a browser might have 3 <html><body></body></html> sets. Its really bad. So I started working on a page that has a form. It is included in the main page with this line of code:
Destroying A Session And Starting It Back Up On The Same Page
I have a quick signup for a friends page, and at the end of the signup I wanna destroy all the session variables using the nice session.abandon then create two session variables for the username and password so they're already signed in, then redirect them to the index page already logged in. Problem is the session variables don't get saved on the redirect when the session has been abandoned on the page. If I take the abandon out and destroy the session variables individually everything works fine and the new session variables survive. But if I abandon the session then set the new variables they do not. Yes, they are being set after the abandon, and do exist as I've written them to the browser before the redirect. Its not that big a deal in such a small scale to delete all the variables individually, but theres gotta be a way incase it was hundreds of session variables right.
Accessing ASP Session From ASP.NET Via Session Cookie
I have a site that I'm trying to migrate to ASP.NET from ASP, and the foremost stumbling block I'm hitting is session state between the ASP and ASP.NET applications. In order to access this information, I'm doing a HttpWebRequest from the ASP.NET side into an .asp page, passing the session name on the get in order to request it from the ASP side and write it back to the response stream, giving ASP.NET access to it. Of course I change sessions each time I make the call from the ASP.NET side. Soooooo, I'm thinking to myself, "Self, shouldn't you be able to fake out the server by getting the session cookie from the initial usage of the asp, pass that data to the ASP.NET, and use that to send a request back the ASP side under the appropriate session?" From a real high level, I enter the site via a .asp page. This page in turn calls .aspx page from within a frame ......
Tracking Session Variables From Outside The Session
I want to create an administration page which lists all the current users who are on the site at the moment. I know coldfusion has this feature built in using the SessionTracker class... does ASP have something similar? If not... is there any way I can just iterate through all the session files on the server...?
Session.session Not Maintained
I have a site developed using ASP, but each page I enter has a different session id when accessing the site using the domain name of the site. When accessing the site from my network and using the internal IP address, it is OK. Any ideas?
How To Transfer A Data Display On 1st Page To 2nd Page Upon Clicking On The Link
I like to know how to write this specifc function on ASP where the user eg: display a set of records on the webpage. Example the data are ID, Name and address. Lets say i display the data on the webpage and i set the Name as the <a href>. So when i click on the name, it will move to another page with the id of the specific name. Code:
On Session_OnStart() Getting Fired When Going From Page To Page At The Same Level As The Global.asa
This is a standard ASP application that has several pages at the root withthe global.asa. I set a session variable session("accountid") = "123456" within an asp page and then response.redirect to the next page and immediately response.write session("accountid") and I get back nothing. But if I set a session variable session("accountid") = "123456" within an asp page and response.redirect to a page in a sub directory and immediately response.write session("accountid") I get back 123456 on the screen.
Including Inverted Commas To Specify Page Elements While Page Is In ASP
I am having a problem with a site that I am developing - my aim is for it to validate as XHTML Strict however, I am running into a couple of problems validating it; in my Response.Write ASP script, I am not including " 's to define page element tags as they keep throwing up errors in the page. Code:
Blank Page Running ASP Page On Windows Vista
I've a strange problem with Windows Vista, running an ASP page on local machine (http://localhost/test.asp), the page does not give me any error but the asp code is not executed (simple code : <% response.write("hello") %), it show me a blank page, I think I've put all the setttings correctly, but maybe I must do something obvious to fix that.
Differentiate Page Requested Versus Page Refresh
I encounter a page reload situation in ASP. It is I need a way to differentiate whether the current page - "Application_Result.asp" got reloaded itself when user click on the browserRefresh button or is requested by the previous page "Application_Form.asp". I tried using <%if Request.ServerVariables("REQUEST_METHOD") = "POST" then%> <!--it is requested from "Application_Form.asp, do something--> <%else%> <!--Application_Result.asp refreshed itself(such as user clicks on the browser Refresh button, do something else--> <%end if%> However, in both cases, the IF statement above all evaluated as true. how to differentiate this two different behavior (Page Refresh versus Page requested by another Page) ?
Can An ASP Page Read A Cookie Written By A PHP Page?
I am working with a developer, on two portions to a site, he is working in PHP and my work is done in ASP. Is it possible for my pages to request data from a cookie that was written by his pages that are PHP but residing on the same server? Just want to make sure before I spend too much time planning out the development on my end.
Passing Information Back To ASP Page From Another Page
I have an application which allow users to search our database. Quite a lot of search fields pull data from other tables. I don't want to populate the dropdowns (total 14 of them) from the database everytime as it slow the page load. Instead I would like to have a link next to the text field which a user and click and the choices can be displayed and whatever the user click in the pop up I want to transfer it to the text box and close the popup. For example there is a Textbox called country. The user can either type in the country name or click on the link which will pull all the countries from table in the database and which ever country user selects, the textbox is popluated with the country name and the pop up closes automatically. Code:
Attempting To Write Create An ASP Page FROM An ASP Page.
I'm trying to write an asp page line by line, as one would create a text file, only my file will end in .asp. One line simply writes a close ASP code tag, or FILECONTENTS=FILECONTENTS & "%>" When this line processed, an error occurs saying that the string was never terminated because the asp page attempting to write this line of code to a NEW asp page reads that close ASP tag (%>), as an actual close asp tag for itself, instead of a STRING value. How do I write this %> symbol to a new asp file, while still maintaining its purpose to close a group of asp code in the newly created page?
Refresh Parent Page From Child Page
This is my coding: window.opener.location.reload(); window.close(); I don't want the IE to pop up the alert msg to false retry or cancel to reload the page. I have tried: 1. window.opener.location = window.opener.location 2. window.opener.history.go(0) But as i carry some data from previous previous page, when i use (window.opener.location = window.opener.location), it can't capture my data as it just load the page. It will pop up error as no data captured : Microsoft VBScript runtime error '800a000d' Type mismatch: '[string: ""]' Any suggestion?
Page Header Or Footer Longer Than A Page
i am facing a problem with CrystalReports for visual basic.Net 2003. I have passed almost through all the problems but still i get a message when i view some reports "Page header or footer longer then a page". I am using ASP.net with VB and the developing muchien is running windows XP. the program works correctly to my computer but when i transfer it to the server machine i get the error . The server machine is running windows 2000 server. It has the service pack on it and framework 1.1 with all the updates. Does anyone have a clwe?
Navigate From A Regular Page To A Secured Page
What is the best way to lead customer from a regular page to a secured page? Regularly, we use absolute path. say first ,a customer is on this regular page for general information: http://xxxdomain.com/index.html, then customer decides to buy something from our site. Then our program will provide an absolute path like this: https://xxxdomain.com/buy.asp. Recently I am doing migration and feel that the absolute path is not convenient for program migration and domain merge. So I am wodering if there is any other way to do it? any suggestions and comments?
Invoking 404 Page Even When Page Exists
Is there a way I can make my server's 404 page display even when a correct page is requested? Here's what I'm doing: on a certain page, the requestor's IP number is checked. If the number is an intranet number (192.168.x.x or 10.x.x.x), then the user is allowed to see the page. Otherwise, I want the 404 page to appear, as if the page doesn't even exist. It's just one security measure I'm implementing.
Page Size In Print Page
I write a page in HTML ,user can print it I want to fix page size in print page set up to (legal) that doesn't need user every time change option how I can do this.
Submitting Data From Page To Page
I am in the process of developing an application and would like to hide the query strings in the URLs. I want to POST data to a page then validate the data. If there is an error I have to send data back via a long query string. Is there anyway to POST data between pages programmatically?
On Page Load - Refresh Page
I have a page (with a form on it) and when the form is submitted, if there is an error the page is redirected to an error page (i.e. your attempt was unsuccessful..etc) Once the user is redirected to the error page, after a few seconds the page automatically takes him back to the previous page he/she was on. This is exactly what I want, HOWEVER, when the user is redirected back to the previous page, I would like for the page to be refreshed so the form can be cleared without the user having to click a reset button or anything like that. Does anyone have any clues to how may be able to go about achieving this?
Automatic Page By Page Web Refresh
I'm using Windows 2000 Pro SP4 and Office 2000 Pro Sp3. I have some dynamic database pages that I do not want a user to see from their local cache of pervious visits to this page. When these individual pages are called, I would always want them refreshed from the server. This is no matter what setting is used by the local browser. The closest KB article I found was Q200131, but that was not helpful to me. If a page by page determination of an automatic server refresh (rather than local cache refresh) is not possible, may I just set my entire web to be a forced server refresh for every page, thereby superceding the user's local browser settings.
Values From Asp Page To Html Page
I have a web form page that passes values to an asp page, in which an email is sent to the customer with those values. The email functionality works fine. But I also want to display these values on a separate "thank you" web page after that. What is the code to make those values display in the "thank you" web page? Does this involve adding code to the asp page and the "thank you" html page as well?
Passing Values From Page To Page
I have code that gets its values from a Request.Form it then inputs the data into the Database.The problem is when I do A Response.Redirect back to the original page I would like to pass a value back to a hidden field in the original page. Psudo Code index.asp ---> User enters data from drop downs ---> values get passed to insertintodb.asp ----> then ----> Repsonse.Redirect's back to index.asp where I would like to get the values from the insert statement back into this page as hidden field so It can be passed to another page based upon the users next actions.
Session Var.
I wrote a website, which uses the session to store and track some vars. Now I am gonna to covert it to desktop application by Activesite compiler 5, however, it doesnot support session , cookie , application() . SO ,I have no idea to find something can instead of session. My orignal processing: Session -> modify Session var -> store to Database.
About ASP Session ID
There is a problem about ASP session ID. ASP session is implemented by storing session id in a session cookie, but I read this cookie in ISAPI Filter, get a string as following: ASPSESSIONIDQADCQQTS = IAOFCBBCGDGMDGCNJIKPNBAN But the real session ID is 554851848. (Real sessionID is sessionID property the ASP session object) Problem is what is relation between them? And how to get real session ID from cookie session ID.
Session
I did a session("adminlogin")=1, if I post it to the same page, it returns true. But if I response.redirect to another page. This value doesn't exist anymore. This is on the actual server where all the ms security is updated. The same script worked okay on my test server (the security patch not patched yet.) Has anyone encountered this? How do you overcome it? I tried searching the net it says the problem lies with a ms security patch. How I wish I can unintall that patch.
Session ?
when does a sesson object expire? - at the end of 20 minutes - after they close their browser ? does that end the session?
How To Get New Session
I have a home page in html with two buttons to call my main.asp in another window my problem is: 1-From my home page I open another web page my main menu, this new page have a SessionID. (OK) 2-If I open another web page from the same home page, this new page have the same SessionID as the page open in first step I want to get a new SessionID for every page I open from my home page and don't want to abandon the first session...
IIS Session And IE7
I have asp and asp.net web application. When I run it in IE7 in first tab it starts a new session. When I open second tab and browse to the same site the new session is not started (infact I need to have new session there). Whereas, 2 IE instances generate 2 unique sessions. Only issue is with IE tabs. Firefox also has similar things but lets not talk about firefox here. I am more concerned with IE only.
Session
In my login script I set session("User") = rs("User") the session timeout is set to 20 min Do I need to setup some kind of update session variable on each page so that the timeout does run out or does iis update the variable aslong as I'm browsing the website ? And another thing, <% application("something") %> works fine on my test server but once I implement it onto the main webserver I dont get any text out, is there some kind of switch that enables this function ?
Session Is Nothing
How can I know if a user session had timed out ? I always get an error in my asp page when I try to access my session variable if it timed out.
Using Session
My buttons default as you can see in the code. But I now want to take what is already choosen in database and chose apropriate button. Can I use a session to choose a radio button? Code: <TD><b><font face="Arial" color="#000080">Password</TD> <TD><input type ="text" value="<%=Password %>" input name="Password" size="50" ><input type ="Hidden" value="<%=userNumber %>" input name="userNumber" size="50" ></TD> </TR> <TR> <TD><b><font face="Arial" color="#000080">Billing Choice</font></b></TD> <TD><fieldset style="padding: 2"> <input type="radio" value="Monthly" checked name="R1">Monthly <input type="radio" name="R1" value="Quarterly">Quarterly <input type="radio" name="R1" value="Annually">Annually</fieldset><p>Hold Billing Date <input type="text" name="NextBillDate" size="20" Value=<%=NextBillDate%>></TD> </TR>
|