Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do i navigate to to login page and pass the return url with parametre How do i navigate to to login page and pass the return url with parametre
Previous
 
Next
New Post
4/9/2008 12:44 AM
 
I have made a site in which a user clicks on image which redirects to a new page with say(image id and image path as parameter) now in that page i check is user register or not if not register I redirect to login page with return url and parameter to return url( check.aspx and parameter image id and image path) but in the login page i didnt not see any return url. I got only this( http://localhost:2724/mysite/tabid/56/ctl/Login/portalid/0/Default.aspx with no return url) please help me string mystring = "~/check.aspx?catid="+catid + "&itemid=" + itemid; Response.Redirect(Globals.NavigateURL(PortalSettings.LoginTabId,true,PortalSettings,"Login","returnurl="+ mystring)); But i cannot view the parameter in login page url. How do I do this? This didn’t help either If Not Request.IsAuthenticated Then Response.Redirect(Globals.NavigateURL(PortalSettings.LoginTabId, True, PortalSettings, “Login”, “returnurl=” & Server.UrlEncode(Request.Url.ToString))) End If Which I got from http://blog.pnbconsulting.com.au/?m=200709
 
New Post
4/9/2008 5:08 PM
 

try this (from Admin/Skins/Login.ascx.vb):

   1:              Try
   2:                  Dim ReturnUrl As String = HttpContext.Current.Request.RawUrl
   3:                  If ReturnUrl.IndexOf("?returnurl=") <> -1 Then
   4:                      ReturnUrl = ReturnUrl.Substring(0, ReturnUrl.IndexOf("?returnurl="))
   5:                  End If
   6:                  ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)
   7:   
   8:                  If PortalSettings.LoginTabId <> -1 And Request.QueryString("override") Is Nothing Then
   9:                      ' user defined tab
  10:                      Response.Redirect(NavigateURL(PortalSettings.LoginTabId, "", "returnurl=" & ReturnUrl), True)
  11:                  Else
  12:                      ' portal tab
  13:                      If PortalSettings.HomeTabId <> -1 Then
  14:                          Response.Redirect(NavigateURL(PortalSettings.HomeTabId, "Login", "returnurl=" & ReturnUrl), True)
  15:                      Else
  16:                          Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "Login", "returnurl=" & ReturnUrl), True)
  17:                      End If
  18:                  End If
  19:              Catch exc As Exception    'Module failed to load
  20:                  ProcessModuleLoadException(Me, exc)
  21:              End Try

 

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
8/30/2011 8:31 PM
 
Brian, your solution works. Kudos you solved my problem too.

I understand this thread is old, but is there a way to pass the same return url to the register module in case it's a new user who does not have an account but decides to register?

Mackeny

pendelea.com -The #1 website for properties in Kenya
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do i navigate to to login page and pass the return url with parametre How do i navigate to to login page and pass the return url with parametre


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out