Determining URL
I working on a project where we will be hosting several websites on
the same server. These websites are built of a similar template and I
want to use the URL as a key to get settings from the database. Is
there a way to programatically get the website url in the
application_onstart.
I know I could hard code it in but that leaves things open to user
error.
View Replies
I am trying to reiterate through a for..next..loop using an integer (i). I would like to know when it is either a odd or an even number, insteading of using the simple version below:
if i = 1 or i=3 or i = 5 then
Response.Write "<tr " & strRowOdd & ">" & vbcrlf
else
Response.Write "<tr>" & vbcrlf
end if
Want to format table rows in a different style.
Any ideas?
View Replies
View Related
how to determine password length using asp...or vbscript. can you include a simple program about password length or any site reference.
View Replies
View Related
I am trying to determine if a field in a database is empty or not. The code I have is this....
(before this I have code that opens up the database, gets the data from the table. the var "content" holds the data if any from the database.)
if content = "" then
alert1 = "content field is empty"
else
alert1 = "content field contains text"
end if
This doesn't seem to work. I also tried...
if (content) then
alert1 = "content field is empty"
else
alert1 = "content field contains text"
end if
No luck yet. Any ideas?
View Replies
View Related
When I run the following code, i get an error:
80070002 corresponding to line18: wshell.run (name).
When I copy & paste this command to prompt it works fine. Have tried other simple commands such as ping as they work fine. Any idea what error number could be or how I could output the error the prompt might be giving. Code:
View Replies
View Related
I am attempting to solve a date/time formatting issue is
VBScript ASP pages. The ASP pages needs to determine what
time zone the client browser is in and tell a COM object.
The COM object then reads information from a proprietary
file and formats the date/time into the appropriate time
zone and returns the information to the ASP in an XML
form.
My question is how do I determine the client's time Zone
using VBScript in ASP pages?
View Replies
View Related
is there a script on telling how long a server's been up? I want to put that on my site.. along with other nifty details.
View Replies
View Related
I have a limited number of ad slots on my website, let's say there are
5. I have lots of people wanting to advertise in those slots, let's
say there are 100. They each join the queue for an ad slot on a first-
come, first-served basis.
I have been trying to find a way to
determine the active date for a queued item. For the first five items
in the queue it's easy, it's just the expiry date of the item in a
live slot that expires first. For the next five queued items it's
still easy, because it's just the expiry date of the item in the queue
that will expire first.
HOWEVER, after that it becomes more complex,
because the queued items will continually be slotting into live slots
as live items expire. So my question is, is there a straightforward
way, in ASP, of determining the active date for a queued item in a
queue of arbitrary size?
View Replies
View Related
I'm working on a site that inserts records into an Access database and Access assigns an auto-incrementing id for the record. How can I quickly figure out what id that was just created? I seem to remember there being a function for this....
View Replies
View Related