47,300 Members
0 added today
498,330 Resources
19 added today

All Devdex   All Gurus  

Simple function to get file name from active page
Author: Bruno Pinho
Rating:
Visits: 1142

Discuss in Newsgroups

Code:

<%
'***[begin : simple func to get file name from active page]***'
Function FileName()
 
 Dim VarPath, ArrPath
 
 
'***[path for the active page/file]***'
 VarPath  = Request.ServerVariables("SCRIPT_NAME")
 
'***[splits path into array]***'
 ArrPath  = Split(VarPath, "/")
 
'***[file name with extension]***'
 FileName = ArrPath(UBound(ArrPath,1))
 
'***[removes file ext (comment if the file ext is needed)]***'
 FileName = replace(FileName,".asp","")

End Function
'***[finish: simple func to get file name from active page]***'

%>

Usage:

<%=FileName%>


Visit my guru profile

Visitor Comments

Sreejith S good work,this article helped me in my recent work...

 

Rate this Code Sample






	
	
	



Credit Card Payment Control
Supports over 25 companies
Managed ASP.NET Solution
Direct Processor Support

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

Web Programming

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2008 Developersdex™. All rights reserved.