Last post Nov 15, 2012 09:54 AM by chandrashekar
Sep 24, 2012 01:33 AM|jyest|LINK
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
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
Nov 15, 2012 09:54 AM|chandrashekar|LINK
Try "OnNavigate" event of the Crystal Report Viewer. Check if the session expires or not and based on that redirect.