?
Solved

how to determine the aspx filename from ascx file in code behind.

Posted on 2006-07-12
2
Medium Priority
?
670 Views
Last Modified: 2008-01-09
Hello everyone,

Scenario:-
       test.aspx
       sample.ascx
       ASP.net 1.1 with vb on code behind.

Problem:- How can i find the name of test.aspx from sample.ascx in code behind. Sample.ascx is contained in test.aspx on html side.

I just like to retrieve "test.aspx" in text form to be used for some other purpose. Please suggest me. I like to perform this in the code behind of sample.ascx.
Thanks.

 
0
Comment
Question by:sainisherry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 500 total points
ID: 17089533
Hi sainisherry,

CurrentPage = page.tostring.substring(page.tostring.indexof(".")+1).replace("_",".")

Will give you this.

Tim Cottee
0
 

Author Comment

by:sainisherry
ID: 17089547
your solution worked.

Cheers mate.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question