Asp Code Variable
What is the asp code variable for System Date and System Time? Are they built-in system variables, or is there some code involved to return the values?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
ASP Code - Anti Spam Verification Code
I'm looking for sample code that will require a use to enter a code from a scued image format. I'm sure you've seen them before where the image is barely readable by a human and the user has to enter the code correctly to submit the form. I'm looking for ASP code and NOT ASP.NET code as I am supporting a legacy site.
View Replies !
View Related
Variable-variable=junk
im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message variable math bit= qty=request.form("oqty")-Request.form("qty") sql = sSQL="Update spares SET spares.location='"&request("location")&_ "',spares.machine='"&request("machine")&_ "',spares.part_desc='"&request("part_desc")&_ "',spares.part_number='"&request("part_number")&_ "',spares.qty='(" & qty & ") "&_ "',spares.min_qty='"&request("min_qty")&_ "',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id
View Replies !
View Related
Can't Get The Variable
I have many buttons that mapping many textbox, when I click button, I want to show a string that contains button number( and the mapping string ), but it failed. Here is the code: ///////////////////////////////////////////////////////////////////// <%response.write"<input type='button' name="'btUS95resone"&" a &"' value='Save' onclick='resone("&a&")'>"%> function resone(cnt) { alert("document.all.txt_note"+cnt) } //////////////////////////////////////////////// It seems that the component I called is not there...
View Replies !
View Related
If Not Variable
Can anybody tell me what is the asp equivalent of the php-phrase: if (!$Variable) {} ? Another question: is there a special syntaxis for asp conditions in condition? I tried this code it doesn t work: If Condition Then If 2nd condition Then ElseIf Then End If End If And it works only when I remove the 2nd condition's End If and the ElseIf. Seems strange, no?
View Replies !
View Related
Variable
I have a text file that looks like this: Artist Name: Kiss Song Title: Rock and Roll All Night Running Time: 04:38 And I need to be able to get the artist name and song title in asp and display it on a website. The thing is, the text file changes with the song being played on the radio. How can I do this?
View Replies !
View Related
VB Variable
I've been given an ASP app written with server side javascript. This app needs to get the username of the person currently logged in to windows (Request.ServerVariables("AUTH_USER") in vbscript). I found a way to get this variable in javascript, but then it wouldn't let me split it (server kept saying method not supported). So I've gave up on getting the username with javascript, and have set variables in VBscript at the top of my page. How do I access those variables within the javascript portion?
View Replies !
View Related
Variable
i have a textbix name "building" inside my system where the user might input one or several building name in it seperated by a comma. How can i extract each of the value in it? For example, "PG2, PG7, PG6", i want to extract each of them.
View Replies !
View Related
Variable
using access db and asp i have a variable from a form sRound = request.form("round") and for now let us say this value is 3 now i want to include that 3 in sql, but it is part of a field name which is round3_report cm.CommandText ="UPDATE rounds SET round" & sRound & "_report = '" & var5 & "' WHERE Name ='" & sName & "' AND meeting = " & var4 & "" cm.execute this isn't working. i keep getting parameter error. i know there is a way to join a word with a variable in order to make a field name in asp/sql
View Replies !
View Related
ASP Variable
I am having difficulty in displaying Response.Write rsVacancies("Title") variable more than once. If I remove it from the page title it displays within the description tag but does not display in both. Code:
View Replies !
View Related
WHERE As A Variable
I am tring to search a database with an SQL statement via a web page. I am using Dreamweaver to build my page. The search works great when I hard code the table field into the Recordset. However, I would like to implement a variable on the field in the table to do the search on. For Instance, a user can make a selection in a drop down box and then enter the text in a text field. I am having trouble implementing the drop down box variable into the code. I suspect I need the WHERE to be a variable just as the LIKE parameter but I keep getting errors. Code:
View Replies !
View Related
SRC With Variable Value
I have one condition for getting the image in an included file. If the file which is including the included file is from parent folder if should pull the image directly from Image folder, otherwise it should change the path like Code:
View Replies !
View Related
Variable From URL
I have created the pages for a website in HTML. I need a script in ASP that displayes the HTML pages when requested (EG: script.asp?page=HTMLpage1). <html> <head> <title>Test site 1</title> </head> <body> <% page = request("page") select case page case main: <!--#include file = "index.html"--> case "services": <!--#include file = "services.html"--> case "case_studies": <!--#include file = "case_studies.html"--> end select %> </body> </html> Any ideas on how to make this work?
View Replies !
View Related
Using A Variable
for example, if i have Code: do while not c.eof if c.fields("id")=request.cookies("id") then response.write "This is you" else response.write "This is " & c.fields("name") end if c.movenext loop the request.cookies("id") does not work! no variable will work in its position, either. the 'if...then' statement above will only work with c.fields("id")="something", not a variable, like i want. how can i get around this?
View Replies !
View Related
Get Variable
I have a HTML-only file, and asp file that do a databasequery.How can I do a query in the html file, like this: DBLookup("2").The asp file execute the query and respond with the result. Send it back to the htmlfile and put it were the "DBLookup("2")" is. I can not have any asp code in the html page.I have a php file that works like this, but how can I do the same with asp?
View Replies !
View Related
Name A Variable
how can I name a variablewith the value of another variable to make the first more dynamic.Code: <% sql = "SELECT * FROM table" set rs = cnn.execute(sql) submodule = rs("ID_submodule") counter_"submodule" = 0 %> The idea is where it says "submodule" is the value of the submodule, because this part of the code is a loop that checks all the table registries. Then the 0 would be 1, 2, 3.. depending of the quantity of registries associated with the ID_submodule related.
View Replies !
View Related
Variable Contains
I have a variable in an app called GenericTitle which contains text, a persons job title funnily enough. I want to check whether this variable contains the word "director" and if it does, then redirect to another page for example. Can somebody post some code that would let me check this?
View Replies !
View Related
Use A Variable In A SQL
How do I use a variable in a SQL database thing. I need to do an insert. I need to know how exactly to type it in. Here is what it is INSERT dbTable (column) VALUE (where variable needs to go) How do I type it. Is it &variable, ''&variable, etc. I know this is easy, i just can't think.
View Replies !
View Related
Variable
I've got a form in my website where the users has to type a message. Is any code in ASP where I can get the last word of the message? Ex If I user types "Active Server Pages" is any code to get the word Pages and put it in a variable?
View Replies !
View Related
Variable
Is there any kind of variables (i think session vars?) that stores the data in it for ever.. I mean i have a project with textbox and button, every time some enter a data to this textbox I want it to store "var=var+1" number of times people done inputing.. then I can show this value in a page.
View Replies !
View Related
Using Variable
I am getting the table name from another page, and i wanna generically use the table name in the select statement the code.. Dim Tbl Tbl = request.querystring("Tbl_Name") rsUsage.Open "Select * from '" & Tbl & "' where ReceptorName LIKE'" & Pri_Key & "'", strConn. i wana do something like that. how do i use a variable for the table name in the select statement?Could someone tell me the proper syntax usage.
View Replies !
View Related
Variable Value
i have a variable which holds a value. i want to only change the value if it lies within certain values my variable is Dim str str="216.35" If the value of str is between 235.00 and 237.00 then change str="100". can someone tell me how my if loop will be?
View Replies !
View Related
Passed A Variable
when guarding against sql injection attack from modified form or querystring variables is it enough to strip out just apostrophes...if the variable USERNAME is the name of a text box passed to a script is the below always safe... q1="select * from TABLENAME where username='" & trim(replace(request("USERNAME"),"'","''")) & "'"
View Replies !
View Related
User Variable
Do you know how to get windows login variables (i.e. the LOGON_USER server variable) from ASP without having to fill in the challenge response message box that automatically appears when you configure IIS to Integrated Windows Security for a particular site? I don't want users to have to log in again to the site as they have already logged in to windows but I want to use their username on the back end to verify permissions. Is it possible?
View Replies !
View Related
Variable In The Field Name.
Usually, we can get data from table by using rst("userid") because we know the column name userid. Now, I have a variable to hold the column name. I want to get data value like this rst(var1). However, I got an error message.
View Replies !
View Related
Assign Variable To Name
itemname = "select sw_item_itemid, sw_item_item , sw_item_lowquantity" itemname = itemname & " from sw_item" itemname = itemname & " where sw_itemcategory_catid = "&catid&"" set displayitem = objconn.execute(itemname) if displayitem.bof and displayitem.eof then counting = counting + 1 ("countnotitem" & counting ) = filtercategory("sw_cat_catlabel") how can I assign countnoitem with a digit ?
View Replies !
View Related
Path Variable
I'm trying to concatenate a path of Application("WebSiteFullPath") which equals http://www.mywebsite.com/ and an image file like CODE below. My problem is the full path listing in RESULTS below adds an extra " quote and obviously breaks the path to the image. How can I script the quotes to not add the extra double quote between my website path variable and my image path?CODE: Response.Write "<img border=""0"" src=""" & Application("WebSiteFullPath") & """images/edit.gif"" width=""15"" height=""15""> RESULTS <img border="0" src="http://www.mywebsite.com/"images/edit.gif" width="15" height="15">
View Replies !
View Related
Post Variable
I have a VB application sending data via post to an ASP page. The application sends two variable: id, txt If txt has the & sign in its string, it cause trouble. E.g.: id = 1 txt = "Hello & more" If I take a look into Request.Form() array in asp page, it shows the following: id = 1 txt = "Hello " more = ""
View Replies !
View Related
Tranfering Variable
I got a asp form page where the POST ACTION = confirmation.asp page is used to save the values collected from text boxes from the form in a database. For example txtTotalOutlay field is being used in confirmation.asp page to update a database field. However, there is a field in the form which is calculated field e.g. NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field. However, in the confirmation field I need to bring the contents of NetOutlay and store it in the same table as the other field. I am wondering whether putting the value of the NetOutlay in Session variable and using in the confirmation.asp field would be the right approach or there be any better way to resolve this.
View Replies !
View Related
Session Variable
I'm trying to set a session variable after displaying a form, then capture the Session variable on postback. For some reason, the below code always returns the form, not the "Step 2" results part. What am I doing wrong? It's on a local network server, not on the web if that matters. <% '* Step 2: Display results '********************************************** If Session("PageAction") = "view2" Then Response.Write "Results" '* Step 1: Display form '**********************************************
View Replies !
View Related
Pass Variable Value
I want to pass 2 auguments to this command like below, but the red line of following java script (server side) doesn't work, which means it doesn't took siteid and whosent vaule. <% siteid = Request.QueryString("SiteID"); whosent= Request.QueryString("WhoSent"); objShell = Server.CreateObject("WScript.Shell"); objShell.Run("cmd /c call rsh host -l username lockunlockRSL.sh siteid whosent", 1, 1); %> Does anyone know how to pass 2 varible siteid and whosent value to this command if not use batch file?
View Replies !
View Related
Global Variable
If i want to declare a global variable in a one page and can be retrieved anyway in any page. how can i do that? the normal one that we declare is : dim execno dim month but what about the global variable???
View Replies !
View Related
Having An ASP Variable In Javascript
I have a menu that I use on my Intranet app, and while I did try to replace it recently, I ended up going back to it. It's built entirely with javascript, and works great. However, there are certain pages where I would like to be able to put an item into a querystring for a link. That is, I might have a link which is worded "Add to this ticket" and the hyperlink associated with that text is along the lines of "addtoticket.asp?ticketid=1000" I am not able to figure out how to have an ASP variable into a link built by javascript. This is the main question. How can I have the ASP variable in a javascript? Because it's Inranet, I don't have the page to show you. However, I have zipped up the two javascript files and placed them at www.middletree.net/js.zip Also, in this case, IE-specific code will not be a problem. 100% of users are on IE5+
View Replies !
View Related
ASP Session Variable
I have created a session variable.... and i have to write code to check for this session for each ASP webpage in my website....Is there a alternative I do not want to repeat the same code for valid session.... in each page..
View Replies !
View Related
Xml Variable FALSE
I'm not too familier with XML, this is probably a simple question but in my script I use this: ... xml.Open "GET", url, FALSE xml.Send() Response.write xml.Responsetext ... now, this is probably a very simple thing and I'm blind or something but how do I make it do something besides just quitting if it's false???
View Replies !
View Related
Redirect With Variable
I'm redirecting a value to a page called update.asp from somepage.asp Recid = Request.QueryString("qryCategory") Response.redirect "update.asp?" & Recid So it shows like /update.asp?3 My question is how do i grab that value (3) and then use it in a query.
View Replies !
View Related
Variable = To Path
I want to create a temperorary variable that is equal to a path that contains two temporary variables fldr1 and fldr2. I can't seem to encode this... Here is some of my code below: Dim TempPath Set TempPath = ("" & fldr1 & "" & fldr2 & " ") Dim RequestFolder Set RequestFolder = fso.GetFolder(Server.MapPath(TempPath))
View Replies !
View Related
Passing Variable With & In The Url
i try to passing variable using get method in a url. this is my example url headertext="PE&CCA" <a href="addsection.asp?uid=<%=uid%>&sublvl=<%=sublvl%>&headertext=<%=headertext%>">add</a> i did print out teh variable headertext at addsection.asp, what i get is from the variable headertext is PE, so what shd i out in the url to get PE&CCA in my addsection page?
View Replies !
View Related
|