0

Here is the structure of my project:

Project:
    Default.aspx
    Reports.aspx
    Scripts:
           myscript.js

I have a situation, when I'm navigating from Reports.aspx page to Default.aspx page, which is loading in new tab, and in this situation, only in this situation I want to run myscript.js at Default.aspx page.

How can I do this?

2
  • For the most part, it's difficult to detect tabs/windows due to the stateless nature of the web. Commented Apr 13, 2014 at 16:03
  • i go to Default.asp from Reports.aspx by <a href ... target="_blank"> Commented Apr 13, 2014 at 16:12

1 Answer 1

1

You can add a querystring parameter when you go to the default page.

Response.Redirect("page2.aspx?insertParameterHere=true",true)

In your default page you can then check if that parameter exists.

Request.QueryString("insertParameterHere")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.