Hello Steve,
did you check that u have this variable in the context in receiver?
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
S> Hi All
S>
S> I have an asp.net 2.0 web with a standard login control
S>
S> I want to pass some extra variables to the redirected page after the
S> successful login
S>
S> I just can't get it to work. help much appreciated
S>
S> ---------------------------------------------------------------------
S> ----------------
S>
S> Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As
S> System.Web.UI.WebControls.AuthenticateEventArgs) Handles
S> Login1.Authenticate
S>
S> Context.Items.Clear()
S>
S> Context.Items.Add("UserNamevalue", Me.Login1.UserName)
S>
S> Context.Items.Add("mydbkeyvalue", 2)
S>
S> FormsAuthentication.RedirectFromLoginPage("steve", False)
S>
S> Server.Transfer("~/memberpages/demos.aspx", True)
S>
S> End If
S>
S> Catch ex As Exception
S>
S> Response.Write(ex.Message)
S>
S> End Try
S>
S> End Sub
S>
S> ---------------------------------------------------------------------
S> -------------------------------------------------------------
S>
S> In a link button onclick event on the demos.aspx
S>
S> Me.lblsamupdate.Text = "Context " &
S> Context.Items("UserNamevalue").ToString
S>
S> I get error 'Object reference not set to an instance of an object'
S>
S> Why?????????
S>