jordanking
Programmer
- Sep 8, 2005
- 351
hello,
I have a create user wizard that also assigns some custom role and profile values in the createdUser event of the control. Once this operation is complete and the user clicks the continue button the user is redirected to a role restricted "Members" page/directory.
The problem is that the "Members" page the user is directed to has a label that displays some personal info from the profile and it throws an error:
but this error does not appear if the user logs in through the login control after the user is created. It only appears the first time the user is redirected to this "Members" page after using the createUser Control.
does anyone know why this happens only after using the createUser control?
.....
I'd rather be surfing
I have a create user wizard that also assigns some custom role and profile values in the createdUser event of the control. Once this operation is complete and the user clicks the continue button the user is redirected to a role restricted "Members" page/directory.
The problem is that the "Members" page the user is directed to has a label that displays some personal info from the profile and it throws an error:
which happens on line 45 wich uses a loginView controlObject reference not set to an instance of an object.
Code:
Line 39: If System.Web.HttpContext.Current.User.Identity.IsAuthenticated = False Then
Line 40: Dim loginButton As Button = DirectCast(Me.LoginView1.FindControl("logEFFU").FindControl("LoginButton"), Button)
Line 41: Me.Panel1.DefaultButton = loginButton.UniqueID
Line 42: Else
Line 43: Dim logName As New Label
Line 44: logName = CType(LoginView1.FindControl("logName"), Label)
Line 45: logName.Text = Profile.FirstName + " " + Profile.LastName
Line 46: logName.CssClass = "ItaliBold"
Line 47: End If
does anyone know why this happens only after using the createUser control?
.....
I'd rather be surfing