473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I get the name of my script?

I need to obtain the name of my aspx script from within the
script. I am developing a web counter, and I need to log
the visitors into a file which has the same basename as the
script?
Thanks.
Jul 25 '07 #1
3 1190
One option is Request.ServerVariables["SCRIPT_NAME"];

Ray at work

<johanwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>I need to obtain the name of my aspx script from within the
script. I am developing a web counter, and I need to log
the visitors into a file which has the same basename as the
script?
Thanks.

Jul 25 '07 #2
One option is Request.ServerVariables["SCRIPT_NAME"];
>
Hello,
Do you know how to get the ip address in text format i.e

www.helloworld.com rather than 10.10.10.10

I know about those
sw.WriteLine(Request.ServerVariables("REMOTE_ADDR" ))
sw.WriteLine(Request.ServerVariables("HTTP_REFERER "))
sw.WriteLine(Request.ServerVariables("HTTP_X_FORWA RDED_FOR"))
sw.WriteLine(Request.ServerVariables("REMOTE_HOST" ))

but all I get is ip address in the "number" format
Jul 25 '07 #3
See System.Net.Dns to resolve the address (it can be done at the IIS level
but with some additional cost for *each* request).

As the example looks like a web site if you want the name of the site your
code is running this is Request.ServerVariables("SERVER_NAME") (likely
exposed in a friendly way by ASP.NET by a property such as
Request.Server.Name or something similar)

--
Patrice

<johana écrit dans le message de news:
Oz**************@TK2MSFTNGP04.phx.gbl...
>One option is Request.ServerVariables["SCRIPT_NAME"];

Hello,
Do you know how to get the ip address in text format i.e

www.helloworld.com rather than 10.10.10.10

I know about those
sw.WriteLine(Request.ServerVariables("REMOTE_ADDR" ))
sw.WriteLine(Request.ServerVariables("HTTP_REFERER "))
sw.WriteLine(Request.ServerVariables("HTTP_X_FORWA RDED_FOR"))
sw.WriteLine(Request.ServerVariables("REMOTE_HOST" ))

but all I get is ip address in the "number" format


Jul 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6390
by: Veverita | last post by:
Hi there I'm hoping that someone can help me with a question I have about javascript syntax. I got an html page that uploads an image and some text field to a database. What I'd like to do...
6
2283
by: Java script Dude | last post by:
We just discovered another IE bug. When an html form contains an element with a name of `name` IE's internal index screws up the .name property of the containing form to point to the bad element...
1
2164
by: Jenny | last post by:
Hi, Can I create an array of tags by assigning same name to these tags? For example, I have two <p> tags with the same name t1. But document.all.b.value=document.all.t.length does not...
21
18114
by: ryanmhuc | last post by:
I know the subject might be confusing. I am no beginner with javascript but I haven't been able to figure out how to get the javascript file name from code inside the file. So you have an HTML...
5
2310
by: Clive Backham | last post by:
I'm having trouble with Instant Payment Notification on PayPal. One of the forms that they generate, which invokes one of my scripts, has a submit button with a blank name. The HTML fragment is...
12
2296
by: Mike Brashars | last post by:
Hi all, I have been searching for a week and am unable to find and example to "Populate picklist from directory and return file name". I have a php script that reads a log file and plots a...
6
5998
by: ad | last post by:
When I a webpage, say "MyPage.aspx", How to get the page name of itsef (MyPage.aspx)?
13
2997
by: amykimber | last post by:
Hi all, I know I'm doign something really daft, but I can't get this to work... I have a form with a bunch of inputs called ship_owner - why the ? Because I'm submitting this page though php...
7
4846
by: moksha | last post by:
Hi, I am new to javascript and i am facing a problem in coding. plz help me out. I am using javascript for dynamically creating a table row which contains text boxes and radio...
3
2380
by: swetha123 | last post by:
hello, I don't know how to use cookies please help me in this I am using the dream weaver cs4 I designed the navigation bar to my page using dream weaver cs4 navigation bar contains...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.