Inserting A Querystring Variable Into <!--include-->

activelang=Request.QueryString("lang")
.
some code
.
Response.Write " <!--#include virtual='/SIFS/" & activelang & "/welcome.txt' -->"

activelang=Request.QueryString("lang")
.
some code
.
<!--#include virtual='/SIFS/<%= activelang %>/welcome.txt' -->

Is there any trick will do the job ?

View Replies


ADVERTISEMENT

Include A Querystring

I'm using a variable in a querystring and some of the variables have spaces in them. When the link is displayed it's giving me the url up to the point of the first space. Is there anyway to include the spaces? It works for me fine on other pages.

View Replies View Related

Run Include Pages With Querystring

i want to include 2 page in ONE ASP page . i want to change include pages with querystring by this method : when open page in normal mode run first include page (EX :index.asp), and when enter querystring in addressbar change page to second include page (EX :index.asp?cat=2) is this possible?

View Replies View Related

Server Variable For Querystring

Is there a server variable that returns the query string part of a url?

Below gets my page, but i need to capture what comes after ".asp"

Request.ServerVariables("URL")

returns

/mywebpage.asp

View Replies View Related

Can't Pass % Wildcard Variable In Querystring

I'm trying to pass the wildcard variable % to another page via
request.querystring.

When I go to pick up the variable through request.querystring, it will
never diplay the "%" if one is included. It will diplay any other
characters included in the variable though.

Code from page 1:

<%response.write "<a href='Page_2.asp?Severity=" & varCombo_Severity &
"&Owner=" & varCombo_Owner & "'>" & "<i> Go to Page 2 </i>" & "</a>"
%>

Code from page 2:

<%varCombo_Severity = Request.Querystring ("Severity")%>
<%varCombo_Owner = Request.Querystring ("Owner")%>

Result: No % wildcards are passed though to page 2

Any ideas?

View Replies View Related

Passing A Querystring Variable Through A POST Form

I am passing a value to a form through the URL as follows:

<A href="http://www.xxxxxx.com/orderone.asp?text="radius">http://www.xxxxxx.com/orderone.asp?text="radius"

On the orderone.asp page, I am reading the value into a text box as follows:

<input name="Template" type="text" id="Template" size="25" maxlength="255" class="body" value=<% = request.querystring("Text") %>

so far it works fine. It shows the value in the text box on the page. I am trying to post this page with all the form fields to a new page that emails all the variables that are on this page. The form tag looks like

<form action="Orderform3.asp" method="post" name="order">

In orderform3.asp, i am requesting the values for all the form fields as follows before emailing all the fields to myself:

strBody = strBody & Request.Form("Account_Name") 'strbody is the variable that adds all the form fields to the body of the email
strBody = strBody & vbCrLf
strBody = strBody & Request.Form("Contact_Name")
strBody = strBody & vbCrLf
strBody = strBody & Request.Form("Template")

Here is the problem...I am getting the email with the values filled in except for "Template" and I cannot figure out why. Is there something that I am doing wrong? i have to mention that there is no DB behind this site...it is just a static web site with an email script in it.

View Replies View Related

Passing Variable With Querystring - Update Db - Error !?

i have a table 'Accounts' in my database, which contains a bunch of
users. From the main menu i choose "edit user" and all users in the db
are presented in a table. The first column 'Pnr' is a unique ID for
each user that i made appear as a link. clicking on one userID should
present a form where the picked users userdata is already filled in so
i can easily edit it and then move on to submit the form to update the
db. i get to the part where all users are listed nicely in a table,
but clicking on one, i get this error:

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested
name or ordinal.
/VS_Files/updateUserForm.asp, line 19

I think i'm doing something wrong with passing a value with the
querystring...? Code:

View Replies View Related

Server.execute Inserting A Variable Into An Array

I have a main page 'album.asp' which server.executes a file 'alicia2.txt'.

I am currently using session variables to move the values of the variables back and forth. I have run into a problem with an array. I currently have : Code:

View Replies View Related

Variable Asp Include

is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that reading the file using "Response.Write FSO.OpenTextFile(ppp, 1, False, False).readall" prints the file, and treating it like a html file.

View Replies View Related

Include A Variable

I'm trying to include a variable in the <!--#include file='db.asp'--> stament?

View Replies View Related

Variable In Include File

It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database. It doesn't work. Anyone knows how to solve this problem. Or has other way to do it.

View Replies View Related

#INCLUDE FILE= Variable

is it in any way possible to include a file specified by a variable name?

View Replies View Related

Passing A Variable To Use An Include

I am trying to write a little script using includes ... but I am getting errors, I am passing a URL variable to use an include.

<!--#INCLUDE VIRTUAL=Request.QueryString("path")-->

Am I missing something?

View Replies View Related

Set Variable To Include Page

im trying to make a string and in that string have an include in to include a .asp page is this possible. Code:

myhtml = ""
myhtml = myhtml & "This Should Work "
myhtml = myhtml & " <!--#include file ="TESTR.asp"--> "

View Replies View Related

Pass Variable Into Include

Is it possible to pass a variable into an include statement?

I have a link as follows:
http://mywebsite/page.asp?project=tsc

My page.asp has three include statements.

<!--#include virtual="/nav_table.asp"-->
<!--#include virtual="/directory/project.asp"-->
<!--#include virtual="/menu.asp"-->

I'm hoping to replace "directory" with the variable in the link so that I get:

<!--#include virtual="/tsc/project.asp"-->

How does one get the variable in to the line above?

View Replies View Related

Feed Variable Into Include Statement

i'm trying to change the following include statement :

<div id="contents">
<!-- #include file="includes/main_page.asp" -->
</div>

on an ASP page into something that receives the file name as a variable :

<div id="contents">
<!-- #include file="<%=fileToInclude%>" -->
</div>

however, this doesn't seem to work, as i get the following error message :

The include file '<%=fileToInclude%>' was not found.

it obviously is trying to find a file named <%=fileToInclude%> instead of seeing the variable my question is : is it possible to feed a variable into an include statement ?
if yes, how should i go about it ? if not, are there any alternatives ?

View Replies View Related

Insert A Variable Value In An INCLUDE Fiel

Any ideas how to make the 'htm1.asp' a variable name?

Say at one time we want to use 'htm1.asp' and another
time we want to use 'htm2.asp' as the include file.

Any ideas?

View Replies View Related

How To Print Variable In A Include Virtual?

how to assign a variable in a page then in a file that is included write a variable to an include virtual statement that's located in the 2nd included file? I've tried this but it doesn't work Code:

View Replies View Related

Accessing/Passing An Object Variable To A Server.Execute Include

I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.

I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.

Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:

View Replies View Related

How To Include The Variable In The "select" Line..

first I typed this:

p=Request.QueryString("num")

then I typed this:

sqlstring = "select column1 from table where column2 like '%p%'"

it find nothing. anyway, if I replace the "p" in the second line to what it was equal, it does find what I need.

moreover, when I print "p" I get the right string.

View Replies View Related

Passing QueryString URL As A Paremeter In QueryString

The subject sounds confusing but here is what i want to do. I have a
button on my page which says

OnClick="javascript:window.open('reportsContainer.asp?pag eURL=Report1.asp?intCurrentPage=1&blnRetrieveFlag=1&Show=1',TasksRPT');"

Now on the Conatiner.asp what i do is
if Request.QueryString("Show") = 1 then
pageURL = Request.QueryString("pageURL")
end if

And then i set the pageURL along with intCurrentPage and
blnRetrieveFlag parameters to my fram src as

<frame height=500 scrolling=auto name="pageFrame" id="pageFrame"
border=0 src="<%=pageURL%>">

Code:

View Replies View Related

Include More Than 1 Include File

I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!

How can i get the menu page included as well as the connecting string?

Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! Code:

View Replies View Related

Calling Com + Object Variable Or With Block Variable Not Set

I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:

"Object variable or With block variable not set"

My vb code look like this.....

View Replies View Related

Passing Data From Javascript Variable To Asp Variable.

is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.

View Replies View Related

Convert ASP Variable To Javascript Variable

How do I convert an ASP variable to a Javascript variable?

View Replies View Related

Querystring

is it possible to check if a variable is present in the querystring, or is that unneccesary? will it assume the variable is empty if it is not present in the querystring?

View Replies View Related

QueryString

i have a hyperlink from a results page:Code:

Response.Write "<TD>" &"<a href = JobDetails.asp?id=" & rs("JobID") &" >" & "Click Here" & "</a></TD>"

the sql statement in JobDetails.asp =
Code:

sqlstr = "select * from Jobs where JobID = '" & Request.QueryString("ID") & "'"
rs.Open sqlstr, conn

im getting this error when i click the hyper link

line 20 is the rs.Open sqlstr, conn line

this error seems to happen with dates but i dont have any dates at all.

View Replies View Related

Querystring

I want to write a page which will
load a default page for me with some links and all. lets say someone
clicks on the link, which not only points to the same page but also
passes a querystring. Looking at the querystring I will then display
data from a database.
So my question in short is... Is it possible to have a single asp page
which can return either a default page where no querystring is passed
or a result from the database when a querystring is passed?
If the answer is yes, then is it a good idea to do this or have 2
seperate pages?

View Replies View Related

QueryString

I've got a request form for samples of our product that we send out. The form is being linked from our ebay auction pages. In the link from the auction page I'd like to include the model number of the sample that they're requesting. (ie. /sampleRequest.asp?AS240)

Then, on my sampleRequest.asp page which contains the input form I'd like to include a hidden field which holds the value of that querystring. Finally, upon submitting this form I'd like that value to be placed into the sampleModel field in my Requests table in my database.

The problem I'm having is how to populate the hidden form field with the querystring form the ebay auction page. Code:

View Replies View Related

Querystring

I have a querystring like this:

checkbox1=2&checkbox2=1&checkbox3=2checkbox1=5&checkbox9=1&checkbox3=1

I would like to insert each set of checkbox1, checkbox2, checkbox3 into a table like field1(checkbox1), field2(checkbox2), field3(checkbox3). Remember each set of 3 checkboxes are 1 unit inserting into a table. Is this possible?

View Replies View Related

QueryString

I am trying to maintain some ASP code that I did not generate and the programmer who did has a very different style than I do so I am having some problems. Hopefully someone out there can help me by answering my question.

I have the following line of code:

If (isEmpty(Request("dir"))) Then.....

Now my question:
Could the Request("dir") used above be the same thing as using Request.QueryString("dir")???

View Replies View Related

QueryString

I just noticed though that when I include the file name to the folder it worked.

ie unitingrhythms.co.uk/?size=4 - no output
& unitingrhythms.co.uk/index.asp?size=4 - outputs 4

can the querystring be read when the file isn't shown?

View Replies View Related

QueryString

i have a querystring on one page where the url looks like:

delete.asp?name=test2.pdf&type=file

on delete.asp i have:

Dim name, type
name = Request.QueryString("name")
type = Request.QueryString("type")

It gives me an error for some reason.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved