I have an asp page that reads in a variable name via the url.but I need to recall the asp page with another variable but don't want to loose the first variable in the url.This piece of code sits at the top of the calllog.asp page,I am wondering if I can use the "choice" variable in the bottom portion of my code
This is the actual calling snippet of code - this is where I would like to use the choice variable as an option
<%
Response.Write "<a href=""calllog.asp?pNum=" & pageNo + 1 & """>Next Page</a>
%>
I have attempted this as well:
Response.Write "<a href=""calllog.asp?pNum=""& pageNo +1 & ""+companychoice=' & choice &'"">Next Page</a>"
i have many different variables like addr, addr1, addr2 addr3 etc and i want this to occur
if addr = "" then error = "ERROR:You have not entered all the required information. <br>Press the Back Button on your web browser and try again." Response.Write error
But that only works for addr. Is there any way to include addr2 and the rest of the variables in that statement without writing it out 50 times
Before I created this thread, I've searched Google and used the search feature of this forum numerous times on how to do this, but couldn't find much.
Basically, I'm trying to pass multiple sets of values from the search form to the ASP into an SQL statement (Access Database).
I can only make it display different prices of a certain music type, eg all prices of rock. But it doesn't output all types of music for certain prices, eg viewing Classic and Rock records with prices of 8.99 and 10.99 only.
I've used the REPLACE command I've found and got around that problem of syntax with numeric/alpha data. Code:
Does anyone know the detail of how session variables are actually stored? The question I'm trying to answer is:
Is it more efficient to store and retrieve multiple short strings :
a) in multiple small session variables b) concatenated and stored as one large session variable c) inserted into an array and stored in a session variable d) it's all the same. Who cares?
Keeping in mind that for this application each piece of data will be retrieved for every page.
I've read that storing a dictionary object in a session variable is bad ews - something to do with ending up with thread in your apartment, or something ;-)
What I'd really like to do is create an XML object and store that in a session variable, but I'm guessing that would be pretty inefficient unless it had quite a lot of data in it.
This is a simple question, but is been a while since I program in ASP and I forgot.
I have a variable like this: 01-00005-03
I need to have 3 variables from that single one... Something like this, from that variable, let for example that is called fullvariable, split it and get the following variable values from it.
Just as the title says I am trying to do something impossible with a single SQL statement. I am doing an ASP webpage for internal use at the company I work for.
I want to know if there is a way to insert/update data into multiple tables in 1 SQL statement.
If it requires functions | views or anything else that is fine but I don't want to have 3-4 different SQL statements to update 2-3 different columns in different tables.
I have a search option on my website, which should perform a search on 4 fields, as follows:
tblNews headline content
tblDatabank filename description
It only needs to return matches which are an exact match of their search criteria. For instance, searching for "I am here" would return a record which contained "I am here", but not just "I" or "I am" etc.
I need to return all these records as part of one recordset preferably, as I want to be able to order them etc., though I imagine you may suggest I use an array somehow to merge two recordets etc., then reorder them?
i hav problem with updating the data. In the asp page i hav displayed records based on search criteria. in display mode im displaying the to be updated field in combo box for each similar contract_no. each contract_no will hav different no of rows and to be updated combo box.
based on the selected value in the combo boxes of different contract_nos i hav to update the combo value with old value. user select multiple combo values at a time I need anybody's help with detailed programming logic.
I am trying to build a web based database using Access and ASP. I can retreive data form the database in a web page. I can send data from one page to another. However, I am stuck trying to figure out how to make the data variable. I would like the second page to display only data the user selected from a drop down list in the previous web page. I tried using the WHERE function and replace the hard coded information with a variable, but it isn't accepting the code. Could someone please help with this? I have research mulitple sites and can't find this particular piece of code or in tutorials. I must be missing something because seems like it would be basic stuff.
I'm trying to reference a username variable that is saved after the user logs in. I can reference it using $(Username) in standard html parts of the page but how do i use it in the script sections enclosed with <% %>
on the page.asp it searches the database for the specific record with id=3. now i cant use : variable = Request.Form("id"), because the information does not come from a form, and request.querystring doesn't want to work either.
I have a webpage with a list of items with checkboxes and a submit button. On the click of the submit button, I call a vbscript that loops through the items and put the values of the checked items in an array or string, and then jump to a new page.
Now I either want to send this variable to the new page, or I want to save the values to a mySQL database table, so I can use the values on the new page.
It seems I can't use session variables (session.contents) for this because that's server-side only.
Is there any way to get input boxes by thier id rather than thier name? (Request.Form("elementname")) I don't want to have to give every box its own id and name when they are just going to be the same.
I know that it's possible to pass more than one url variable using '&' querying 2 columns in the database.However,I want to pass both the words 'piano' and 'keyboard' to the same column [instruments] in a database).
Here is the code for just 'piano' and this works fine.
Search_quick.asp?<%="search="&"piano"%>
This is processed by a request.querystring("search")
I'm building an application that allows visitors to our site to view GPS survey data. The data is collected several times a day and the files written to a different directory each day. Thus, for July, there are 31 folders.
There is a calendar on the site that people can click on the date they want to get the data for. Then, a window will open and the contents of that days directory will be displayed in the window.
Our app is at http://test.c-b.com/CORS/ - the data is supposed to be accessed from the calendar but now all I can do is view the root files. I just can't figure out how to target another directory with the FSO using a variable passed from a querystring.
How do I write variables in the URL like in PHP? Then, How do I pick up variables that are in the URL!
E.g. in PHP = main.php?name=David
Because i've just started in ASP from PHP and I was wondering how you goto a URL with variuables in...! And how ASP gets them from the address URL as it seems not to automatically pick them up.
I have a number of form fields that I wish to temporarily record into variables and pass to a small number of subsequent pages.
Is the best way to save each one to a session variable when I submit the form and then to clear the variables when I no longer need them?
Also, if this is the best method, what is the code for saving a form field to a session variable when the form has not yet been submitted. For example, when I submit Form1, I want the contents of Field1 to be entered into SessionVariable1 and then the form to be submitted as normal.
I have a database being updated by a text file every ten minutes, so in the code that is why the column names are messed up.
My problem is I get all the sums, and counts all working. What I need to do is at the end of it have a sum for for all the columns returned, i.e. col002, I need all the sums in that column added up for a total at the bottom. The following code works but when I try to do column totals I can't get it to work, Code:
I am requesting a variable for the users' network username:
<%=Request.ServerVariables("LOGON_USER")%>
This returns the following:
NETWORKJ.Bloggs
Instead I would like it to return J.Bloggs on it's own with out the "NETWORK" bit so basically I am saying how do I cut out the first 8 characters of a variable.
I am using Session variables in my ASP application. I have tested the application on a Win2k professional and it works fine. When the same web app is installed on a win2k advanced server from the client browser when the app is accessed the session variable returns null inspite of a value being already set. I have checked the IIS enable session state settings. When i use the server machine as client and access the app as localhost then the session variable has correct value.
How can this be solved? What other settings if any, need to be changed to get it work.
Do session variables carry over if you've left your site and come back?
My shopping cart uses PayPal/IPN to transact and then enter details of the transaction into my database. All of the data entry takes place after IPN has returned all of the data to my site.
A couple of the fields I need to populate are held in session variables throughout the application. When the customer clicks on the checkout button, and is sent over to PayPal's server to complete the transaction, will the session variables still be available to me upon returning to my site?
I am trying to pass a variable from another page to a sql statment. The variable specifies the one of the columns that I want the sql query to return. I also want to display field contents of the column later in my page. I can't seem to get this to work. Can someone give me a hand? Here is my code:
My goal is this - to use cookies to remember items viewed by a specific user.
There is no registration process so need to identify each visitor & was thinking about using the session ID of the first visit as the identifier, is this okay?
So now I've identified a user I wish to attach to the cookie the imageID of every item that person has viewed i.e.