You have to cast to specific type before assiging it back.
In c# it will be ctrlarr = (subway.peopleinfo)Session("ctrlarr")
Not sure what VB cast looks like
> Hi all,
> I have the following code, without option Strict on, it seems work OK,
[quoted text clipped - 12 lines]
> Session("ctrlarr")=ctrlarry in the first page if I turn on option Strict.
> What should I do in this case?
c676228 - 15 Feb 2006 00:18 GMT
Hi GS,
I did
ctrlarr = CType(Session("ctrlarr"), PeopleInfo())
It didn't complain anything.
I haven't run the code, guess it's OK.
Thank you.

Signature
Betty
> You have to cast to specific type before assiging it back.
> In c# it will be ctrlarr = (subway.peopleinfo)Session("ctrlarr")
[quoted text clipped - 16 lines]
> > Session("ctrlarr")=ctrlarry in the first page if I turn on option Strict.
> > What should I do in this case?
Steven Cheng[MSFT] - 15 Feb 2006 07:18 GMT
Hi Betty,
I suggest always explicitly cast object to their actual type since that'll
also help improve performance and avoid problem.
If there're any other problem, please feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)