Hi,
I'm building a .NET 2.0 app using C#. Here's my issue:
I have a standard .aspx page with CodeBehind in a separate .cs page.
From this page, I'm opening a new page using target='_blank' from an OnClientClick to view a chart in a full window, notes, photos, etc and to do this I'm using a Response.Redirect with a QueryString:
The onClick does this (edited version):
This is called from an OnClick in an asp:ImageButton:
This works great, and took a while to get to this stage. HOWEVER, when I return to the original page, ANY control I then click on opens a new window! This applies to dropdowm lists, Help icons, anything on the page!
I'm thinking it could be to do with using a QueryString and therefore a GET action within an ASPX page which will POST
to itself by default, but am lost after that...
The only way to stop this is to Refresh the page, I'm obviously missing something here...any ideas?
Thanks in advance,
Bob
lastdonuk
I'm building a .NET 2.0 app using C#. Here's my issue:
I have a standard .aspx page with CodeBehind in a separate .cs page.
From this page, I'm opening a new page using target='_blank' from an OnClientClick to view a chart in a full window, notes, photos, etc and to do this I'm using a Response.Redirect with a QueryString:
The onClick does this (edited version):
Code:
protected void Report_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("NewPage.aspx?data="+data);
}
This is called from an OnClick in an asp:ImageButton:
Code:
<asp:ImageButton ID="Report" runat="server" ImageUrl="~/images/report.gif" AlternateText="View Full Report (will open in a new window)" OnClick="Report_Click" OnClientClick="Form.target='_blank';" />
This works great, and took a while to get to this stage. HOWEVER, when I return to the original page, ANY control I then click on opens a new window! This applies to dropdowm lists, Help icons, anything on the page!
I'm thinking it could be to do with using a QueryString and therefore a GET action within an ASPX page which will POST
to itself by default, but am lost after that...
The only way to stop this is to Refresh the page, I'm obviously missing something here...any ideas?
Thanks in advance,
Bob
lastdonuk