Compose Variables
I have a list with a lot of variables. The variables all start with
Langstring, followed by a number.
Langstring1 = "text1"
Langstring2 = "text2"...
I have a database with only numbers in it. Now I want to use these
variables in a dropdown box as selected item. Is it possible to compose
variables out of two parts?
I tried response.write(Taalstr&RSItems("Testfield"))
It gave me Langstring1 because the number in the field was one. I want
it to return 'text1'. Is it possible?
View Replies
ADVERTISEMENT
can anyone tell me difference between environment variables and server variables.
View Replies
View Related
I'm not sure how to best describe my problem, so a simple example should help explain things:
I have two arrays, called set1_data and set2_data
if I create a variable like so:
firstPart = "set1"
and then assign like this:
copyOfArray = firstPart & "_data"
how do I make copyOfArray reference the set1_array, as opposed to just a string "set1_array" which is what it's doing?
I've had a good rummage round ye olde Internet but couldn't find anything there must be a keyword or function to achieve this?!?
View Replies
View Related
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.
View Replies
View Related
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 <% %>
View Replies
View Related
How can I get the value of a variable set in ASP from
inside vbscript tags. Here an exampleCode:
<%
Dim x
x = "something"
%>
<script language=vbscript>
msgbox(x)
</script>
I need to display the variable in a msgbox but can within
ASP.
View Replies
View Related
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.
View Replies
View Related
I am new to asp and have tried a few things and cannot get it to work. I thought this code:
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
would work for making the x_cust_id value equal what was put in the x_email field - but that doesnt work - any idea what Im doing wrong.
View Replies
View Related
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.
View Replies
View Related
how can we use variables in sql statements
View Replies
View Related
Does anyone know how to get a variable to transfer from ASP.NET to an ASP page?
View Replies
View Related
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.
View Replies
View Related
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")
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
I need to write a if statment to find a part of a word. By Example:
variable = "ASP Free forums"
if % variables % = "ASP" then
statment
else
exit
end if
I've tryed to uses the '%' like in SQL queries but didnt work. Is there any idea?
View Replies
View Related
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.
View Replies
View Related
how do I set & use variables in Global.asax. i ve missed that chapter in the book i read.
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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?
View Replies
View Related
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:
View Replies
View Related
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.
response.cookies("Mysite")(SessionID)=1.jpg
then
response.cookies("Mysite")(SessionID)=2.jpg
View Replies
View Related
Is there a way to close a single session variable, once it's been created? I have an application that requires a several session variables to be created once a person enteres a certian section of my site. When they leave the variables are set to nothing, as they are no longer needed. I'd like to just close them out, but I will still need to keep the session open, so Session.Abandon will not work in this case.
View Replies
View Related
I recently reformatted my PC and reinstalled ISS onto Windows 2000.
Since I have done that, my local sites don't work as they used to.
By that I mean, if I have a login page, such as this: Code:
View Replies
View Related
This is hopefully a really simple issue... but what is the best way to pass a variable from one .asp page to the next?
View Replies
View Related
On my IIS 5.0 i have enable session state set to 20 minutes
ASP SCRIPT TIMEOUT set to 200 seconds.
On my asp pages i even coded in session.timeout = 60
When i check the value of one of my sessions on a page i
am being returned to main page.
i.e If session("basket") = "" then
go to mainpage.asp
When i check the session.timeout on the page this is set
to 60
If i wait around for a few minutes i.e 5 then i am taken
back to mainpage.asp...
The server is not given me the 20 minutes session state.
View Replies
View Related
I need to assciate two varaibles dyanmically in value of the checkbox.
How can I do that? For ex., I have the following:
<td><input type='checkbox' name='chk<%=i%>' value='<%=rs("Field1")%>'>
Above, I need to add second fields value from database in value
property of the checkbox.
View Replies
View Related
I want to change the value of my variables when clicked on an url.
I can't seem to get this working, i've tried something like the
following:
<a href=""newpage.asp"" LINK</a>
What is the way to get this right? I'm pretty new to this so maybe
the onClick is the wrong way.
View Replies
View Related
I'm trying to post variables using http to a site with a different domain and need my page to wait until it gets a returned value back and then insert that value returned into a database. Once I'm able to get the variable back i know how to get it into a database, just don't know how to have the page wait for the value returned.
View Replies
View Related
How can I Access GET Variables in ASP?
View Replies
View Related
How do i refer or even create a variable of a variable in ASP.
(equivalent to PHP's $foo{$bar} ) ?
View Replies
View Related
After moving my website from one server to another (Windows 2000, IIS 5,
same as old server), I am forced to use the cInt function to convert all
variables that compare against a numeric value.
For example, on the old server I could code something like this:
If sRecCount > 0 then . . .
The new server requires me to use:
If cInt(RecCount) > 0 then . . .
If I don't use the cInt function, I get a Type Mismatch error. I can't see
anything that is different from one server to another.
Any ideas?
View Replies
View Related