Solved

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

Posted on 2006-07-12
2
664 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
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 125 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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