I need to pass a static parameter to an included ASP file. I'm thinking about using this with a query string, but upon reflection I'm not sure how I can do this. For example:
---file start: FIRST.ASP ------
<%
Server.Execute("second.asp?a=1")
%>
<!--- ***** or ***** --->
<!-- #include file="second.asp?a=2" -->
-----file end: FIRST.ASP --------------
Now, if I do a Request.QueryString("a") in second.asp, is it performing a query on FIRST.ASP then? How can I retrieve the parameter?
View Replies
View Related
Is there a way i can send variables to an included page other than the session. I know about doing it via the session but i find that a bit messy and it might affect system performance.
can i use
server.execute (my.asp?id=6)
or something similar ?
I have to include a menu on the side of every page that looks different depending on what page is being displayed so i need to find a way to do this properly.
View Replies
View Related
I'm trying to use server.execute statement to include in an asp page another asp page with a parameter. That's because I've a parametric query in the second asp page and I have to pass the value
<% Server.Execute("result.asp?key=2") %>
I can't do it. That's the error message I get:
Server object, ASP 0231 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs
Maybe the method doesn't support a parametric URL? If so, how can I do?
View Replies
View Related
I have a problem with input parameter which has Decimal DataType. Stored procedure (SQL 2000) works but it rounds all
values off, i.e 5.555 input becomes 6 and 1.3 input becomes 1.
In table QTY has data type decimal(5) - precision(8) scale(3).
Please, suggest what's wrong with this:
newqty = Request.Form("quantity")
..........
cmd.Parameters.Append(cmd.CreateParameter("qty", adDecimal, adParamInput, 5, newqty))
cmd.Parameters("qty").Precision = 8
cmd.Parameters("qty").NumericScale = 3
View Replies
View Related
I'm building my asp page using a table. Part of building that table includes:
......
Response.Write("<td>" & rsi.fields(3).value & "</td>")
Response.Write("<td><input type=button value=""Remove"" name=RemoveButton onclick=""RemoveAgent();""></td></tr>")
......
......
My problem is that my table has multiple records each line has a Remove button at the end. I need to pass rsi.fields(0).value to the RemoveAgent routine when the button is pressed.
I thought that my onclick event would become........onclick=""RemoveAgent(rsi.fields(0).value) ;.......
but I receive a syntax error. Thinking about it it's a bit more complex than that in any case because at the point of clicking the button, I am not sitting on the correct record within the recordset since I am sitting at the eof after creating the table
View Replies
View Related
I want to pass parameters via response.redirect.
After a search on google, I have seen various types and i am getting confused on the best way to do it.Can someone let me know if i can do it the same way a href?
View Replies
View Related
is it possible to pass parameters in html like in asp.... products.asp?cat=3
.... what i want to do is when i click on a html link, it opens up news.html,
and then opens up a particular news article in an iframe on that page.
View Replies
View Related
Is there code that I can use to 'repeat' code.For example:I have a form that has about 30 fields on it. I then submit it to anotherform that has about 20 fields on it. I then submit the second form to a third and so on. During this process, I pass all of the fileds as Hidden Fields. My code has over 200 hidden fileds in it and sometimes they get mis-spelled or somthing. I thought that I saw something that you can tell the page to 'repeat' certain code for all parameters on the page by using a FOR EACH command.
View Replies
View Related
I have some troubles with the correct syntax, hope to get some help. This is the intention. This is the code I'd like to use.
strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->
View Replies
View Related
Need some help passing parameters
address = Info_RS("Address")
city = Info_RS("City")
st = Info_RS("State")
zip = Info_Rs("Zip")
<a href="address.asp?param1=Address¶m2=city¶m3=st¶m4=zip">Address Change </a>
It will not pass.. it just passes the text.
View Replies
View Related
Is there a way to pass a URL parameter from a previous page to the next page (without clicking a hyperlink)?
There are 3 pages. user_edit.asp, user_delete.asp, user_delete2.asp. I want to pass the customer_id parameter from user_edit.asp via a hyperlink to user_delete.asp and then after some asp manipulation I want to pass the existing customer_id parameter to the user_delete2.asp page (or again to user_delete.asp) without the user doing anything (such as accessing a hyperlink).
View Replies
View Related
I am running into an issue when I try to write more than 1024 characters to
a memo field. Apparantly the odbc connection I am using does not permit
literals to be larger that 1024 characters. This Memo filed can take
virtually infinate data, so the solution seems to be use parameters. My
problem is I have never heard of this and need this to work ASAP Does
anyone have a simple example of how Parameters work using ASP
View Replies
View Related
I have several parameters that I need to pass into a stored procedure. Each parameter holds a comma delimited list.
I tried splitting the parameters and executing the stored procedure doing the following:
Dim CmtIdLoop
CmtIdLoop = Split(Request.Form("commentsID"),", ")
revwStatLoop = Split(Request.Form("review_status"),", ")
abrstatLoop = Split(Request.Form("abr_status"),", ")
commentsLoop = Split(Request.Form("comments"),", ")
For l = 0 to Ubound(CmtIdLoop)
s = CmtIdLoop(l)
t = revwStatLoop
u = abrstatLoop
v = commentsLoop .....
View Replies
View Related
I am trying to do any better than this and am losing my confidence daily as I pressumed this to be easy and I am sure once I have done it I will wonder what all the fuss was about!
My experience with ASP is limited to one Degree module and I am trying to build a prototype web site. I need pointing in the right direction to what I presume is a common ASP requirement - a ‘second level of user enquiry’. Code:
View Replies
View Related
i have a folder Services and this folder has index.asp file. i need to put a link in email specific to the user. i can do:
www.myweb.com/Services/index.asp?parm1=1&parm2=2
How i can do this same very thins as
www.myweb.com/Services?parm1=1&parm2=2
as the default file name is index.asp so it will get executed if i put www.myweb.com/Services in the URL Address box. Here when i try to pass parametrs to the folder, this results in page not found.
View Replies
View Related
I wrote a simple client/server chat program and the client runs as an
activex control within an asp page. I have the users logging into
the page using widows authentication and I'm using
Request.ServerVariables("AUTH_USER") to get the users name. I'd like
to pass this name to the activex chat client thru the page but I'm
having some difficulty. I tried passing it as a parameter to the
"Tag" property within the <OBJECT> element like this:
<%
username=Request.ServerVariables("AUTH_USER")
username=right(username,len(username)-instr(1,username,""))
' remove the domain or machine name from the username
Response.Write "<PARAM NAME=" & chr(34) & "Tag" & chr(34) & " VALUE="
& chr(34) & username & chr(34) & ">"
%>
When I do this the ActiveX control doesn't appear on the page. Is
there a better way to do this? I also tried creating a public sub in
the activex control and calling it as a method from within the page
but I can't seem to get the syntax right. I keep getting "Object
Required" errors.
View Replies
View Related
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
Im working on a new site and im not using frames, im using #include files. The isse is you cant put a variable into an include file because includes are loaded befor variables and this means that the include dont work...
what ive done is make an include page with a quirystring passing which page i want to load in, then on the included page it looks at the case and when it = 2 for example. it loads whats in case 2 which in this case is <!--#include file="../XtraNET/Forum.asp"-->
trubble is theres 52 menu items, if the site would always have 52 menu items this would be solved, but you can add new ones.. thusly i need to be able to dynamic the code...
My train of thought is can i store the whole <!--#include file="../XtraNET/LiveChat.asp"--> statement in the database and call it within the code dynamicly, like a document.write or somthing.
View Replies
View Related
I just started ASP/ASP.NET two days ago. I would like to know the best way to go about using this include file method to contain my connection string stuff. As I understand it, a connection should only last as long as the query action (unlike VB6 with a persistent connection.)
So, what would be the best stuff to put into an include file for my connection stuff so I only have to make one change throughout the ASP/ASP.NET app?
Any other experiences with good things to put in that include file?
Can I also create the connection object in the include file and use it in multiple pages?
View Replies
View Related
I need to include an asp file from another server.Code:
<!--#include file="SicurezzaDip.asp"-->
I think that is the normal way to do it. I've also used the code shown below, but it doesn't seem to work..Is it possible to Include asp files from another server ? How can i do it
Code:
<!--#include file="http://81.74.60.30/Asp/SicurezzaDip.asp"-->
View Replies
View Related
I've created two separate files that I use as includes to display the header and footer of each page.Everything works fine if the pages that contain the includes remain in the same directory: the root directory. However, I want to use the includes in other places but I can't figure out a good way to solve the problem of the paths that are in the actual include files (path to stylesheet in the header, etc.).
Here is my basic directory structure on the web server (I've used "code" to make it easier to read):
Code:
- root
- include
header.asp
footer.asp
+ images
- misc
contact.asp
index.asp
I want to use the same include files in contact.asp but, obviously, the paths are going to be wrong. I've tried using Server.MapPath in the paths of header.asp and footer.asp so that the includes can be used anywhere in the site but, it is not working.And, I don't want to have the physical path visible in the source code. Is there a function or method I don't know about that can give me a path to the "root"?What have you done if in a similar situation?
View Replies
View Related
if it's possible to have a select tag in an include file which is to be included into an ASP page?I have an include file which renders a popup screen. The screen has text
fields i.e <input type="text"> fields which gets input from the user. I want to change one of the fields to a ddl and the field will not show up.code:
<select> <option value="">Choose One</select>
As you can see its the most basic of code, but it doesn't show up on the screen. When I change the code to a text field it does.
View Replies
View Related
I've tried both methods of using include files VIRTUAL= and FILE= when I use the VIRTUAL include I receive the error:
Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file 'ProductList.asp' was not found.
and when I use a FILE include the page just produces nothing the regular page script runs so I know the asp is working but the include files just produce nothing. which leads me to believe something is wrong with my settings in IIS. Im running IIS on Windows 2000.
View Replies
View Related