Reputation: 7
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?
Upvotes: 0
Views: 42
Reputation: 3783
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")
Upvotes: 1