Hi,
I have developed a custom module to handle registration for one of my clients. I couldn't use the core registration control (even if I had added new profile properties) - because they wanted extensive customizations.
In the module, all the required validation is performed, and the user is registered and signed-in programatically.
After the registration, I try to re-direct to another page on the site with this code:
***************
Protected Sub cmdRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRegister.Click
Call UpdateDatabase() 'this adds/updates the user - and signs them on if it is a new user
Dim intPageRedirect As Integer = 0
Try
Dim objController As New DotNetNuke.Entities.Tabs.TabController
Dim objInfo As DotNetNuke.Entities.Tabs.TabInfo = objController.GetTabByName("Home", PortalId)
intPageRedirect = CType(objInfo.TabID, Integer)
If Me.hiddenURL.Value = "RETURNING" Then
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(intPageRedirect))
Else
Dim objInfo1 As DotNetNuke.Entities.Tabs.TabInfo = objController.GetTabByName("Thanks", PortalId)
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(CType(objInfo1.TabID, Integer)))
End If
Catch ex As Exception
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(intPageRedirect))
End Try
End Sub
*******************
I get a {System.Threading.ThreadAbortException} on this line:
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(CType(objInfo1.TabID, Integer)))
... and the user is re-directed back to the Home Page - and they are signed-on to the portal
Any ideas why this is happening?