fritz_the_blank
asked on
Determine name of calling page from an include file
Hello all--
I have a page let's say pageA.aspx that includes a page called pageB.aspx.
This pageB.aspx is called by most every page on the site.
I'd would like find the name of the page that calls the include pageB.aspx so that I could add conditional logic to pageB.aspx based on the name of the page that includes it. Is there an easy way to do this?
Thank you for reading my post.
I have a page let's say pageA.aspx that includes a page called pageB.aspx.
This pageB.aspx is called by most every page on the site.
I'd would like find the name of the page that calls the include pageB.aspx so that I could add conditional logic to pageB.aspx based on the name of the page that includes it. Is there an easy way to do this?
Thank you for reading my post.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your post. It gave me an idea that worked perfectly. On the main page, I declared a variable. On the include page, I checked to see if that variable existed. This saved me having to declare the variable on the header of each page.
You're welcome, glad to help.
ASKER
If someCode(PageA) then
'some code
Else
'different code
End if