i have logically divided each .asp page in one or more "states" then i need to store somewhere information about what state has each client on each page i consider 3 ways:
store info in the DB : {page,sessionid} is the PK - in a file: which i have to read on enter to the page and write on exit the page - in the session object: storing an array on a session variable, like session("x")[1...N] each way has a pros and cons, i'm choosing the last method, but i know it consumes much memory.
Having trouble getting Session to persist. Have checked properties of the Virtual Directory in IIS4 manager and "Enable Session State" is checked, with time out set to 20 Mins. Have also checked the Project Properties in Interdev 6.0 and confirmed that "Sensionless ASP Pages" is NOT checked.
When moving from one page to another within the application it starts a new session for each page : I've confirmed this both by Writing the SessionID and by adding a Variable into the On_Start of the Global.asa. Only trying to store a single digit in a Session variable.
I want to be able to inform a user that his session has timeout when he has been idle beyond his session. Like the normal message you get when your session ahs been idle for sometime.
I can only get one cookie (which does not persist) from the following asp script:
<script language="vbscript" runat="server"> ' cookie_test.asp ' Copyright (c) 2002 by Dr. Herong Yang ' This ASP page displays all the cookies received by the server. ' response.write("<html><body>") ' Displaying all the cookies response.write("<b>Cookies received at this time:</b>:<br/>") set c = request.Cookies response.write("Cookies.Count = " & c.Count & "<br/>") for each n in c response.write( n & " = " & c(n) & "<br/>") next response.write("<b>Cookie added by the server:</b><br/>") n = "Cookie_" & (c.Count+1) v = "Value_" & (c.Count+1) response.write( n & " = " & v & "<br/>") response.cookies(n) = v response.write("</body></html>") </script>
Which results in: Cookies received at this time:: Cookies.Count = 0 Cookie added by the server: Cookie_1 = Value_1
(I'm not sure if this is the right forum for my post - my question is about vbscript, but I didn't see any vbscript forum, so here goes.)
I've created a registration page on my website which gets called from a number of links on the site - I want to capture user information before allowing them access to these sections of the site.
Once a user has registered, I want to recognise that fact when they click on any of the other links, so I'm setting a cookie. However, while it works fine in Firefox, it won't persist in IE - even across a single session.
Here's the code I'm using :
In the 'Thank you for registering' page, the very first lines on the page are :
<% Response.Cookies("Registered") = "True" Response.Cookies("Registered").Expires = Date + 1000 %>
Where the links that require registration appear on the site, I am building the <a href> tag as follows : <a href= <% if Request.Cookies("Registered") = "True" then %> "PageX.asp" <% else %> "Register.asp?RequestedArea=ReportDesign" <% end if %> class="bodyLink">Report Design</a>
but it keeps going to the Else part - ie. it's not finding that the Registered cookie has a value of True.
i get data with ado i need to get a xml string from the recordset how can i get it without having to persist the recordset in a (xml) text file is there a simple way ?
i'm setting up my web new server. i see that cookies do not persist after a Server.Transfer or Response.Redirect although i do expire them the next year.
I need to know where I can get information about learning how to code in ASP. This getting cide snippets and such doesn't work out real well if you don't know what to configure. Also I would like to have my own work not someone elses.
In different examples I've seen different ways to do the same thing, and I want to know what is best (fastest, easiest to remember, same command for all types of stuff, etc)
For example, to get data from a database, should I use:
[VBS]set rs = conn.execute sqlstmt[/VBS] or [VBS]rs.Open sqlstmt, conn[/VBS] or something else?
I have a form that I use a few option selections from DB table and a insert script at the end.I'd like to have access to aditional info from the same table after choose an option
I am trying to retrieve data from a dropdown listbox in asp using:
<%Response.Write + Request.Form("cboBox")%>
The problem is that I only retrieve the first value of the option. For example, if my first option was <option value=this that>, I only can retrieve "this". It won't get the second word.
Recently, I came across a site with information to my area of knowledge. The pages have been designed and consist of the .asp extension in the url. I'm not able to select the text on the web page, either click right mouse button or anything to copy the information. when I'm trying to print it is not perfect. So, I would like to know from ASP guru's whether there is any way of saving the information on the web pages, so that the same can be formatted in a word document for printing purpose.
My web site is windows authenticated. When someone connect to my site, I get his SID with a small active X object which uses OpenProcessToken and GetTokenInformation (token user etc ...
But now, I also need the SID list from AD user object SIDHistory. (when a user is moved across domain).
I've got a WYSIWYG editor, that runs off a template page (i.e. template.htm) that gets opened in an iFrame for editing. How can I get it setup so I cange the template at the click of a button? I've tried doing a form with radio buttons, but can't get it to work. For example, the iframe source has been set to "strTemplate". My form processing was along the lines of:
<% If request.form "template" = "template1" then strTemplate = "template1.htm" Else strTemplate = "template.htm"
If request.form "template" = "template2" then strTemplate = "template2.htm" Else strTemplate = "template.htm"
Basically I want to be able to send users (if they sign up to it) an SMS alert whenever someone leaves them a message on a webpage. Similar to Hotmail where you can get an SMS when you receive an email, or Ebay where you can get alerts if you are outbid.
I'm thinking maybe something very similar to CDO in terms of coding Code:
im running an asp page where by i can upload a xls file- which adds data to a database provided it passed validation. this then sends a success message to the user. what i need is a button where i can call the data which was recently added into the database- but dont know how to go about it or code.
<% FOR EACH field IN size_info.FIELDS Response.write("<option value=''>" & replace(field.name, "asize", "") & "</option>") NEXT%>
to loop the names of the fields in a DB, but I cannot get it so that is the value of the data in that field is lower than 5 it simply doesn't show, i thought i might be this
<% FOR EACH field IN size_info.FIELDS if size_info.fields.name.value > 0 then Response.write("<option value=''>" & replace(field.name, "asize", "") & "</option>") end if NEXT%>
Is this the right forum for this. Considering using this but not sure, specially considering the price and I would need to add a host. If you have any knowledge please let me know. Also if this the right forum, also let me know and I will give more details. It is an ASP program of course.
Currently I have one asp page which opens after the proper ID entered by user and it generate <A> tag with application software download link. When the user click on the link (which is pointed to the actual physical file.EXE of Size around 10 - 20 MB) it downloads file. But how do i change the logic so that the activity will get LOG in some text file. Like which user has downloaded which file. (it should log into text file).
I think I need to remove the <A> for direct download instead it shoudl call an asp page whcih should log the event and push the file to user.suggest with sample code if possible.
When you hover over one of the topic in this forum a box appear with the first few lines of the message in it. How is this created. What events area used to creat something similar and does anyone know of any good website where i can look at a tutorial for it.
I dont even know what they are called so dont know what to search for even on the web as if i write pop up i get something else which i dont think is what i really want to use, or maybe it is.
I am working on a users system for my site. I have the databases and most of the pages set up. But, I need to create a page called "My Info". This page would display only the information of the person that is logged in.
I am curious as to how I would retrieve only one entry in an access database and display it based on the person logged in.
I have an intranet site hosted in IIS 5.0 Win2000, and want to display the name of the user logged into the local machines(WinXP) in the pages they access like 'Welcome JohniBravo'.
So, i used the Request.ServerVariables("LOGON_USER"), but get a blank ("") displayed in the page. And i even tried "REMOTE_USER" but, still the same. from somewhere i got to know that theres something called 'Allow anonymous user' should be enabled to get these info from servers. help me with the same?
if there is a way of verifying information that is in the registry of the user's computer? Or is there a way of checking if a file is on the c: of the user's computer?? I want to make a certain verification of who is entering my website.
but the IP address is never the same (since it is randomly given to the user) and I can't use the LOGON_USER variable because the users are not all in the same domain. And cookies are too easily destroyed with the IE options.
I never had this happen. When i display my database into a table it displays fine. But if i change the order of the columns some of them won't display. No error codes at all.
i'm using a SQL DB with char, text and datetime fields. What can be wrong?
Can anyone tell me how to set my rates for billing? I have a reasonable amount of HTML experience along with Java and JavaScript but I don't know where I can find salary/rate information for ASP design work.