I am migratting a vb6 application to a asp.net application, in the original app I used a simple form with CRViewer control and it receives the data to show and also the report name.
I need to traslate it to asp.net, but I don't find the way to use only one webpage with Crystal Viewer control.
I am trying to handle the PreviousPage property to get the dataset and the report name, but I have lost the previouspage property, I tryied to use tye viewstate("prevpage"), but when I try to make a select case of the previouspage to identify the data and the report name I got an Error:
This is the code where I am trying to have reference to previous page:
:
If PreviousPage IsNot Nothing Then
If ViewState("pagPrevia") Is Nothing Then
ViewState("pagPrevia") = PreviousPage.ToString.Trim
Else
pagPrevia = ViewState("pagPrevia")
End If
Select Case ViewState("pagPrevia").ToS
tring
Case Is = "ASP.paginstalaciones_aspx
"
pagRegresar = "pagInstalaciones.aspx"
Case Is = "ASP.plantas_aspx"
pagRegresar = "pagPlantas.aspx"
End Select
:
The exception gotten is invalidcastexception:
It cann't convert an object type 'ASP.pagplantas_aspx' to type 'ASP.paginstalaciones_aspx
'.
Start Free Trial