The datalist has linkbuttons that when the user clicks on a report name the report opens in an new aspx (ShowReport.aspx)page. On the page that has the datalist, I added javascript code that opens the report in a new window:
Dim strPop As String = "<script language ='javascript'>" & vbCrLf _
& "window.open('ShowReport.aspx', 'Report');" & vbCrLf _
& "</script>" & vbCrLf
And then in the code-behind of the submit, which opens the report, the code is:
Page.RegisterStartupScript("Pop", strPop)
The issue is that if the user clicks the back or forward button on the browser ShowReport.aspx opens up again with the report.
Any suggestions on how to resolve this?
Please let me know if I need to provide more info.
Do the link buttons do anything else in the postback?
If not then you don't need the postback and as such the pop script won't be part of the page load, but part of a client action based on the actual user click. Clearly some minor ammendments required, but it depends on the question above.
Rgds, Martin.
For the benefit of all users please mark any post answers as appropriate.
rds80
Member
52 Points
158 Posts
navigating back/forward
Mar 26, 2007 07:23 PM|LINK
The datalist has linkbuttons that when the user clicks on a report name the report opens in an new aspx (ShowReport.aspx)page. On the page that has the datalist, I added javascript code that opens the report in a new window:
Dim strPop As String = "<script language ='javascript'>" & vbCrLf _
& "window.open('ShowReport.aspx', 'Report');" & vbCrLf _
& "</script>" & vbCrLf
And then in the code-behind of the submit, which opens the report, the code is:
Page.RegisterStartupScript("Pop", strPop)
The issue is that if the user clicks the back or forward button on the browser ShowReport.aspx opens up again with the report.
Any suggestions on how to resolve this?
Please let me know if I need to provide more info.
Thanks.
mokeefe
Star
10850 Points
2098 Posts
Re: navigating back/forward
Mar 27, 2007 04:37 AM|LINK
Do the link buttons do anything else in the postback?
If not then you don't need the postback and as such the pop script won't be part of the page load, but part of a client action based on the actual user click. Clearly some minor ammendments required, but it depends on the question above.
Martin.
For the benefit of all users please mark any post answers as appropriate.