- How To Get Script File Name In Asp.net
Getting The Current Script File Name From The Url Is Easy With Asp.net We Will Show You How To Obtain It , Last Updated: Sun Jul 05, 2020
Thu Oct 07, 2010
welcome to Webune support forums
we provide Window Web Hosting
if you are a beginner programmer in ASP.NET and you want to know how to display the script file name you are currently using you might find this tutorial useful.
lets say we have a file called filename.asp
how can we get the file name to be displayed within your script. ok, this is how we are going to do it.
lets create some code, open your text editor (like notepad) and copy and paste the following code:
The name of this file is: <%
now save the file as filename.asp and run it on your IIS server. (open it with your browser to see it in action)
you should see something like this:
The name of this file is: /filename.asp
if you are familiar with PHP, this is similar to $_SERVER['PHP_SELF']