Redirect to newly created control.
Last Post 02/15/2006 9:16 AM by Lee Sykes. 5 Replies.
Author Messages
sandi sandi
Nuke Active Member
Nuke Active Member
Posts:28


--
02/08/2006 10:48 AM  

Dear Lee,

I want to redirect to my page after successfully registration. So I have created new page (web control into security folder.) Now I want link of that page so that I can use it into redirect function.  I have added new page into this location - \DNN\admin\Security\MyPage.ascx 

Can you please tell me how to do this.

Thanking you,

Sandi

Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
02/08/2006 10:54 AM  
Hi Sandi,

To be honest I haven't programmed this before, so I don't know without researching it. - I would pop across to the DNN forums as someone must have already implemented this.

When you find the answer, let me know, I will be interested in reading the solution.

Thanks,
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
sandi sandi
Nuke Active Member
Nuke Active Member
Posts:28


--
02/11/2006 1:21 AM  

Hello Lee,

Here is more description about my problem... side by side i am looking on other forums... Meanwhile if you find  solution please reply me...

I have created control into admin/security/ folder and have added it as control into ‘User Account’ module. I have given key to this module as ‘RedirectOpt’  and its ascx is physically located at admin/security/RedirectOptions.ascx.

 

Now, I want to call this control on Page_Load event of register control. So I have added following code block in to register.ascx.vb.

 

 

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

 

Response.Redirect(NavigateURL("RedirectOpt"))

 

Catch exc As Exception    'Module failed to load

 

            ProcessModuleLoadException(Me, exc)

 

      End Try

 

End Sub

 

 

Now it is redirecting to this http://localhost/DotNetNukedev/Home...fault.aspx link. But it is not the control, which I have created. On my control I have added some text boxes, and above link is showing blank page.

 

 

Can you please tell me how this is behaving. And how can I redirect to my control (RedirectOptions.ascx.). Though its key is right, it is not redirecting to my control so please tell me where it is going wrong.

 

 

Note: I have properly created RedirectOptions.ascx into admin/security/ folder and added some text boxes. So I am expecting redirection on this page and it should show my textboxes. When I keep break point on Page_Load event of RedirectOptions.ascx.vb, it is not going there, it means RedirectOptions.ascx is not getting called.

 

Also I have tried

 

Response.Redirect(EditUrl("", "", "RedirectOpt", ""))

 

Response.Redirect("Home/tabid/36/ctl/RedirectOptions/Default.aspx", False)

 

Response.Redirect("Home/tabid/36/ctl/RedirectOptions/Default.aspx", true)

 

All the time it is redirecting to the blank page.

 

 

I appreciate your quick reply.

 

Thanking you,

 

Sandi
sandi sandi
Nuke Active Member
Nuke Active Member
Posts:28


--
02/11/2006 1:23 AM  

Hello Lee,

Here is more observations…

 

 When I used

 

1) Response.Redirect(NavigateURL("RedirectOpt"))

 

 It is throwing expectation as “Thread was being aborted” but still redirecting to http://localhost/DotNetNukedev/Home...fault.aspx" target="_blank" rel="nofollow">http://localhost/DotNetNukedev/Home...fault.aspx

 

 2) Response.Redirect(NavigateURL("RedirectOpt"), False)

 

It is not throwing any exception but redirecting to this blank page. http://localhost/DotNetNukedev/Home...fault.aspx" target="_blank" rel="nofollow">http://localhost/DotNetNukedev/Home...fault.aspx

 

 3) Response.Redirect(EditUrl("", "", "RedirectOpt", ""))

 

It is throwing expectation as “Thread was being aborted” but still redirecting to http://localhost/DotNetNukedev/Home...fault.aspx" target="_blank" rel="nofollow">http://localhost/DotNetNukedev/Home...fault.aspx?mid=-1

 

Note: Here reason may be it is not getting proper module ID.

 

4) Response.Redirect(EditUrl("mid", "75", "RedirectOpt", ""))

 

It is redirecting to http://localhost/DotNetNukedev/Defa...ct+format. And showing error on page "A critical error has occurred.
Input string was not in a correct format." Also throwing exception as “Thread was being aborted”

Please throw some light on it....

Thanking you,

Sandi

sandi sandi
Nuke Active Member
Nuke Active Member
Posts:28


--
02/15/2006 9:11 AM  
Hello Lee,
Found the solution... I remove the moduleid for my control and my above redirection start working... now it is working properlly on my live site too...
Thanks,
Sandi
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
02/15/2006 9:16 AM  
Great, glad to hear you've managed to get it working, thanks,
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile


---