Loop Round All Querystring Parameters?
Is it possible to loop round all querystring parameters in a web page (i.e. access them without hardcoding them)?
I want to do this because I have a page that has different querystring variables passed into it depending on the content of the calling page.
View Replies
ADVERTISEMENT
I looped a record set to display and I found a strnage thing. as
Do While NOT rsBinAct.EOF
l_bin = rsBinAct.Fields("o_bin")
l_niin = rsBinAct.Fields("o_bin_niin")
l_b = LEFT(l_niin, 3)
l_n = RIGHT(l_niin, LEN(l_niin)-3 )
' display l_bin, l_b, l_n in a table-like page
rsBinAct.MoveNext
Loop
If I do not set the l_b and l_n to NULL then if the next l_niin is null value, I will get the l_n value of previous one only, l_b is still null. I wonder why.
View Replies
View Related
I have asp1 that posts to asp2 which uses request.form to get info
from asp1. How can I get the window.open function to process form
asp1's posted inputs? What I am trying to do is allow the user the
choice of viewing an asp in a frame, or in a full window. Either way,
I want it to open asp2 and have the request.form get the info. This
doesn't work for me using window.open, I assume, because form asp1
isn't being submitted, and it's action (which is the URL of asp2)
isn't used.
View Replies
View Related
Is it possible to have a word template read a parameter from the querystring :
<a href=clientSideTemplate.dot?ID=4>Click Here</a>
What is the syntax to access the objects in the IE application from within Word VBA?
View Replies
View Related
I'm trying to use a database of workshops to create a menu structure. So far i've been able to cycle through the db and make a selection of Categories.
These categories are hyperlinked in the format aspwmenu.as?wid=xx where the xx is the category of workshop.
Where i'm having trouble is using the request.QueryString value to select the matching workshops from the db. I can't get it to look back into the recordset.
I'm sort of new at this as you can probably tell, but i'm having no luck being able to get lists via the querystring. Hopefully someone can see what's going wrong here. Code:
View Replies
View Related
I have the following equation.
<% varWT = Round(CInt((rsFreePack.Fields.Item("Weight").Value)) +
CInt(Session("w"))) %>
Assume....
Round(CInt((rsFreePack.Fields.Item("Weight").Value)) = .12
CInt(Session("w")) = 30
How can I get it to always ROUND up to 31 ...?
View Replies
View Related
I have a number with a decimal point that i always want to round upwards to the nearest whole number.Now i can use the round(No.) function and this works for any value of .5 and above the problem is the lower .1 .2 .3 .4.So an example
if i get the number 14.2 i want the output to be 15
11.3 = 12
13.8 = 14
View Replies
View Related
If I have a value that is 53.123499999, how can I round it to 53.12?
View Replies
View Related
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
I'm trying to pass a parameter from a for loop to the nested while loop
but only the first counter is passed. Here is the code:
View Replies
View Related
I have a recordset that I loop through all of the data within a table, within the same loop, I am trying to add another loops that pulls information from the first recordset to base the second recordset off of: Code:
View Replies
View Related
I have a variable (ex. 5.66666666) and I want to round it to 2 decimal places. Anyone got this code?
View Replies
View Related
I've created a freight calculator that needs to know how many pallets I'm shipping. I'm using 1 pallet for 750lbs and an extra pallet for anything more than that.
If materialWeight <= 750 Then numPallets = 1 Else numPallets = Round(materialWeight / 750) End If
Now, let's say the materialWeight/750 ends up being 3.2. This is returning 3, but I need it to return 4 since we need an extra pallet.
How can I make it Round up to the next whole number? If it turned out to be an exact number without a decimal then it should stay where it is, but if it's over x.0 at all it should go up to the next whole number.
View Replies
View Related
I'm working on finishing a project the was started by someone else who no longer works here. Its an asp page that takes a whack of numbers form a db, and makes em look all pretty in tables. (its a remake of an excel spreadsheet)
the problem is some of the numbers are not apearing properly. I'm thinking it's because they used Round() sometimes and formatNumber() other times.
the question is... do these functions handle numbers differently? i know formatNumber can do more then just round but i just need it to make the numbers 1 or 2 decimals.
View Replies
View Related
I want to round numbers to include a 0 at the end.
response.write "<td bgcolor=white align=center class=menuText>" & 100 - Round(CTASCAvail,2) & "%</td>"
response.write "<td bgcolor=white align=center class=menuText>" & 100 - Round(Avail,2) & "%</td>"
the following code will round the numbers 2 decimal places but if it is a 0 it will not display it.
View Replies
View Related
Does anyone know how I could round the minutes to the nearest 15 minutes, I'm using this
%=minute(now()) %>
View Replies
View Related
Given: total = 18.01
I use FormatNumber(total,2), it give me 18.01
I use FormatNumber(total,0) it give me 18
I wanna to get 19, how should i do the code?? if there is any decimal
value, i wanna round it up to the next whole number.
View Replies
View Related
I am dividing a value by two .. what i need is to round the number up if it is not a whole number.
View Replies
View Related
i have a very simple question which is driving me nuts. Using the ASP function Round():
Why do BOTH Round(1.775, 2) and Round(1.785, 2) both give the exact same result of 1.78 ?
Surely they should give different results, 1.78 and 1.79 respectively.
View Replies
View Related
for eg x = 3.14. I want to do a round up to 1 decimal. if I were to use round(3.14) , I will get 3.1 , however I want to round up , expecting to get 3.2 .
View Replies
View Related
In ASP, how do I do this?
Like 1.5 ---> 2
1.001 ---> 2
4.3---> 5
5.0001---> 6
View Replies
View Related
how to round off numbers i have tried 2 different ways but hitting the dead end. say for example the number stored in my variable is
strnum="112"
i want to round it to 115 so my new value will be strnum="115" . so if its 113 it should be rounded to 115 . if its 116 or 117 or 118 or 119 it should be 120 . if its 111 or 112 or 113 it should be 115 . how i can round the numbers.
View Replies
View Related
How can I round the value to the nearest whole number. I have searched on math.round but
can not get it to function. Here is how I am getting the results if not division by zero. Code:
View Replies
View Related
If I have a number that looks like 32.3, 15.5, 30.1 etc, I always assumed Price = Round(Price,2) is actually rounding a figure into a whole number or putting 32.30 etc.
So how do you exactly round the figure to whole number or put a zero at the end of it. I was thinking of formatNumber but I can't remember if there is a function for that?
View Replies
View Related
I'm using the following:
priceDelivered = Round(((totalMaterialPrice + rateWithHandling) / sqFtAmt),2)
It works great except for when it ends in 0, like $4.80. It only prints $4.8.
How can I make sure that even when these numbers end in 0 it shows 2 decimal places?
View Replies
View Related
i am stuck on rounding i have a variable which holds a number like this
a=234.56789
and i want to display only
234
so i did like this
a=Formatnumber(a)
and output is
234.56
but i only need 234
View Replies
View Related
Good:
246/10 = 24.6
round(24.6) = 25
Bad:
246/100 = 2.46
round(2.46) = 2 (I want 3)
If I have a decimal, I want to round up. Always. How do I achieve this in ASP?
View Replies
View Related
cart_calc_shipping_cost = (Rs.Fields("InitialCost")+(round((Weight/1000)+0.5)-1) * Rs.Fields("AdditionalCost"))
Seems to give me this error:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'round'
I think it is to do with the value of weight, however weight does have to be sometimes 0 so how can i fix this?
View Replies
View Related
We log hundreds of SQL injection attempts per day -- the type with
CAST(0x44004500... AS VARCHAR(4000)). It amuses me that the last thing the
attack does is DEALLOCATE its cursor. My SQL Server DBA tells me this makes
no difference. So...
Are these hackers cargo cultists? Or am I missing something?
View Replies
View Related
I have a simple website linking to an access database. The script works fine on my local machine. And it works fine on my regular host. However, I have uploaded the website to a Windows account with GoDaddy and here is my problem.
I am receiving the following error:
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/home.asp, line 10
- the WEIRD thing is that if you hit refresh enough times, the page loads fine. Then, at random (it appears), the error resurfaces. No coding changes at all. Code:
View Replies
View Related
I've been coding since mainframes had 4MB of core memory (yes kiddies, that 4MB), I've never coded a classic ASP page, only ASP.NET.
I've noticed many problems in this forum seem to stem from building SQL commands by concatenating strings and could be avoided by using parameter substitution, a totally common concept in ASP.NET. So, is that just something that can't be done in classic ASP?
View Replies
View Related
My problem is: I've created an ASP/MS Access app with Dreamweaver. I have an admin page to edit/delete records. When I edit or delete a record, it works the first time and redirects me back to the main page.
When I click on another record it adds the URL parameter to the end of the previous URL parameter and I get an error. Is there a simple piece of code to check the URL for the same parameter so that it will not just add it to the end.
View Replies
View Related
I am calling an ASP page from JavaScript using window.open(<URL>?<few parameters>) parameters can be in Japanese so I am using encodeURI to encode it. In the ASP files I am using Response.Charset="UTF-8" and still when I check the URL with Request.QueryString it looks OK,however when I call Request("<parameter name>") I get the parameter value not in UTF8 format but in ISO-8859-1, does anyone familiar with
this? Is it a known bug with the Request object? Is there a way to force it to deal with the data as UTF-8?
Currently the only solution I have is to taker the value from QueryString and parse the whole URL by myself.
View Replies
View Related