Hi experts
My environment is VS2008 + .NET framework 2.0.
When end user clicks "next page" of CrystalReportViewer, if session is expired I need to tell the user to re-login.
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Not Session("UserId") = 1 Then
'hide crystal report viewer, and shows a "session timeout" linkbutton.
CrystalReportViewer1.Visible = False
LinkButton1.Visible = True
'or simply redirect
'response.redirect("login.aspx")
End If
End Sub
however both aproach doesn't work.
'hide crystal report viewer, and shows a "session timeout" linkbutton. -> page_init is invoked however the crystalreportviewer1 is still visible and linkbutton1 is not visible.
'redirect -> does not work with "redirect cannot work with callback"
(it's probably because the callback is ajax etc, not a page postback)
How can I resolve this problem?
many thanks in advance