adrienne Posted June 3, 2004 Posted June 3, 2004 Hi everyone, I am passing values from one web page to another.I am using the following code in the web page. The user clicks a tree view link in order to view this web page. Public Class FileNumber Inherits System.Web.UI.Page Public sourcepage As Login Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then sourcepage = CType(Context.Handler, Login) lblUserRights3.Text = sourcepage.Property1 End If LeftNav.BuildTree("Tasks", lblUserRights3.Text) This works fine on the first page where i use this code ,however, I get a specified cast is not valid error when I try to use the code on other pages even though I have called server.tranfer in the sourcepage for these pages. Thank you a Quote
Moderators Robby Posted June 4, 2004 Moderators Posted June 4, 2004 Do the other pages have "Public sourcepage As Login" and do the sending pages have "Property1"? Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.