Run Commands Depending On Origin

Is there a way to tell an asp file which set of commands to run depending on what file they just came from?

View Replies


ADVERTISEMENT

IP Origin

I'm looking for a way to make an asp 3.0 script that could give me the origin of an IP adress. All I need is the country name and the state name.

View Replies View Related

IP Address And Origin

My site is being invaded by AFRICA SPAMMERS mostly from Ivory Coast (
according to my stats program) using USA or UK credentials (zip codes etc)
to fool the registration monitor.

Is there any way that I can grab the IP address as soon as someone lands on
the site and determine the country of origin? Since I am only interersted in
USA or UK origin visitors this would be a convenient way of preventing them
get on the site at all.

View Replies View Related

Country Of Origin

I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)

i.e. something like (I know it not real)
<%If Request.ServerVariable(".HTTP_USER_ COUNTRY")="UK" Then %> ...

View Replies View Related

Running SQL Commands Using ASP.Net

I have been trawling the net to find a decent example of a way to connect to an sql 2000 server using asp.net and run a few commands.

One of the commands i need to run is: "EXEC sp_addlogin 'Albert', 'B1r12-36', 'forum2'"

how to do this, and display a 'successful' message on the page if the command completed successfully.

View Replies View Related

System Commands

What is the syntax for running say. a batch file (.bat) from within ASP?

For example... in MS Access you can say something like this...
----------------------------------------------------------
CurrentDBDir = "c:"
ShellWait CurrentDBDir & "runthis.bat", vbNormalFocus
----------------------------------------------------------

This would run the "runthis.bat" file located in the c: directory. How would one accomplish this same thing in ASP?

View Replies View Related

ASP MS Word Commands

Is there a way to insert a word page break into an asp script? I have a script which uses the MS Word Document.ContentType to display a long table and I'd like to insert a page break at certain points so I can print it nicely.

View Replies View Related

Can Server Side Asp Run DOS Commands?

i have an asp page and id like to run some DOS commands to copy files around on the server to a new directory on the server, and then run an exe afterwards. some sites tell me its as simple as Code:

View Replies View Related

Printing DOS Commands From An ASP Page

I'm attempting to print to a Zebra printer (barcode) by taking the results of an .asp page and sending the output to the Zebra printer, which will interpret the output / embedded Zebra Program Language (ZPL).

Thus, printing the output at runtime. Does anyone know how to send a dos command from an .asp page that will send the .asp result output to a notepad file then send the notepad file to the printer at run-time? I tried the following code:

View Replies View Related

Server Intensive Commands

Can someone explain what kind of commands demand most attention/resources from server and how an internet server distributes its time among web programs/users. You can also refer me to certain pages where I can read through it.

As far as I know, people prefer using objrs.execute statement instead of other commands like .addnew or .edit etc. the problem is since I don't know much about this hardcore stuff of DB, I continuously have to ask people on ASPFREE to help me. although here people here are awesome but the problem is that sometimes it takes too much time so it's better to have first hand info in your head.

View Replies View Related

Nested SQL SELECT Commands?

I have an ASP page where I build a html table dynamically by reading a database table and populating the <TD> cells with the fields of each record.

I want the last field to be a html drop down list that contains values read from another db relation in the same db. It would seem to me, (i'm novice) that this would require nesting SQL SELECT Code:

View Replies View Related

Executing Shell Commands In Asp

I'm trying to execute a Windows command in ASP. For example, this is a snippet of what I have right now:
....
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("notepad", 1, true)
Set WshShell = Nothing

The strange thing is that notepad.exe actually appears under the list of processes in Task Manager, but its window does not show up on the server's desktop; the client's browser just sort of hangs. I'm led to believe that this has something to do with IIS permissions, but I'm not certain.

View Replies View Related

Executing Windows Commands Via ASP

Quick question: how can I execute Windows command (like deleting liles from
server) via ASP?

View Replies View Related

HTML Or XML Depending On Client.

Suppose I have a widget A that I would like to embed in several websites B,
C, and D.

Sites B and C are happy with the widget the way I've styled it but site D
isn't and wants to restyle it themselves.

What would be the best way of doing this in ASP? My thoughts are that I
have an ASP page that determines in a query string has been provided (issued
to site D) and returns XML otherwise returns my formatted HTML.

View Replies View Related

WScript.Shell To Execute Ms-DOS Commands?

How can I use WScript.Shell to execute Ms-DOS commands and can I see the
outputs commands in the asp page?

In the past, using Win. NT 4 Server and cmd..shell attribute to a variable I
could write the results in the screen page.

Any sample?

I couldnīt find any samples yet for win. 2000,ms-iii 5.0 and asp in my help
files, tutorials and guides, etc...

View Replies View Related

Sending An Email Depending On CheckBox Value

I have an ASP page with ten checkboxes and depending on which checkbox is selected I need to send an email to a specific recipient.

Thus far, I am able to send the values from page one to page two, but using CDONTS email functionality isn't really working. Actually, I can't imagine where to begin.

View Replies View Related

Different Messages Displayed Depending On Stock Level

I want to display a different message deppending on the amount of stock left. For example if there is no stock i would like to display "out of stock", if the item is in stock display "in stock". Code:

View Replies View Related

Changing Cell Color Depending On Content

Is there a way of having a cells bg color change depending on its content? And what would be the best way of doing it?

I am wanting to use a traffic light style system for coloring number content cells. 0-33 Red, 34-66 Amber, 67> Green

View Replies View Related

Load Different Code Depending On Number Of URL Variables

Currently, when I'm building dynamic pages I build a page (for example, default.asp?ID=2) to process one variable within the dynamic URL (ID), and find myself having to create a seperate page if I want to process 2 variables for the same content (i.e default.asp?ID=2&Dt=3).

Surely there's a way of loading different content on the page depending if the URL you to the page has either one or more URL variables - is there a way of doing this? I've been thinking about it, and would it be simplest just writing an IF statement (e.g : if the URL contains only one URL variable, load this content, if it contains 2 URL variables, load this other content.

Would someone please be able to give me an example of how this IF statement would be written?, as I've never had the need to write an IF statement before. If you are able to give me an example of the IF statement I'm after, would you be kind enough to comment it aswell so I can understand the methodology behind it?

View Replies View Related

Change The Text Color In Input Box Depending On The Value Of It

I want to change the text color of the input box depending on the value entered by user.

View Replies View Related

JavaScript - Display Text, Depending On Input

I want to have a user input a value (1 through 10) in a form. Then click submit. and right under that have text appear depending on what they input. This is what I have, but it doesn't work. I'm not understanding the flow of the script getting called. Code:

View Replies View Related

How To Set Form Fieds Depending On Selected Item In Drop Down List

I am having a drop down list and other text boxes in a form. I need to retrive and fill text boxes from database depending on the selected item in drop down list. I am using javascript as scripting language. Can any body give solution.

View Replies View Related

Session Retrieve Of Username Depending On Which User Logs Into The System?

I have my system set-up, where by when a user accesses the cms, a time stamp is added to the database. So we can keep check of when people accessed the system.

The added benefit of my addition, is that a session timeout is usable based on the inputted timestamp the user logged in. I added this functionaility because the system could be idle for some time and if so set the session to equal nothing or similar.

However what would be a nice feature of the cms is the display of the current user.

Below is code I have inputted to give some idea of what I am doing

Session("ADID") = objRS("adminID")
objConn.Execute("UPDATE tblAdmin SET adminLastLogged=now() WHERE adminID=" & Session("ADID"))

Session.Timeout = 30 ' 30 = Minutes

SO does anyone know how I can retireve the adminUsername based on the session used when loggin into the system.

View Replies View Related

Systematic Updating Of Records Depending On Amount Of Records In Another Table

The problem concerns 2 tables, cart_products and cart_shoppingcart.

Cart_products contains all the product data (eg, prices, product's key name, etc), but most importantly, it contains the quantity of stock (prod_quantity) for each item.

cart_shoppingcart contains all of the user's items in their shoppingcart, including those that are part of an (customer) order; these have the order_number to differentiate from those that aren't in any order (their Order_number is 'no_order', the others have the order number).

Now, what I want to do is this:

For every item in the order (ie, every entry in cart_shoppingcart that matches the username and order number), take the quantity (x) the customer is ordering, then take the quantity of stock remaining (y), then subtract x from y to create the new stock level (z) and update the appropriate record in cart_products with z (all this with SQl preferably).

I was thinking of using a Do while loop, but realised that it wouldn't work as I'd have to use several SQL statements and then I'd run into a problem the minute ASP reads "objrec.movenext".

View Replies View Related

Generating A Combo Box Depending On The Field Selected In A Former Combo Box

I 'm trying to display a combo box (which datas are coming from a database) depending on the select of another combo box in the same form. I think I should use the property onChange of JavaScript but don't know what to give in parameters.

In fact, I have an ASP function which generate a table containing the Strings obtained thanks to a request in a database. Then I'd like to put the Strings contained in the table, to a combo box. The combo box should refresh each time the user select another field in the former list. It must be developped dynamically.

View Replies View Related







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