[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 672
  • Last Modified:

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

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
sainisherry
Asked:
sainisherry
1 Solution
 
TimCotteeCommented:
Hi sainisherry,

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

Will give you this.

Tim Cottee
0
 
sainisherryAuthor Commented:
your solution worked.

Cheers mate.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now