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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPop Up DNN Registration Control from ModulePop Up DNN Registration Control from Module
Previous
 
Next
New Post
3/22/2012 3:00 AM
 

How would I pop up the DNN 6.x login control from my own custom module code behind?  The user has to eitehr log in or register to complete my form so  I want the suer to stay on the same page after regsitering.

to be clear... any user can enter the page so I don't want to protect the page using security roles.

User comes to the pae,clicks a button on my module and the module launches the DNN Login control.  THe user logs in or registers using the DNN registration control if he isn't registered.yet.  After logging in or registering, the user continues filling out my form.

Thanks for your help.

 
New Post
4/12/2012 4:06 AM
 

HI There,

I have similar use-case and problem as well. 

did you get a solution for it?

Thanks

 
New Post
4/12/2012 5:07 AM
 
    Try below code to pop up dnn registration control on your module:

     if (UserId==-1)
            {
                string returnUrl = HttpContext.Current.Request.RawUrl;
                if (returnUrl.IndexOf("?returnurl=") != -1)
                {
                    returnUrl = returnUrl.Substring(0, returnUrl.IndexOf("?returnurl="));
                }
                returnUrl = HttpUtility.UrlEncode(returnUrl);
                UrlUtils.PopUpUrl(DotNetNuke.Common.Globals.LoginURL(returnUrl, (Request.QueryString["override"] != null)), this, PortalSettings, true, false);
            }

Over 20 + professional dnn modules for News Article, Store, Video Gallery, Photo Gallery, Ultra Flash Player,YouTube Video, Image Slide show, Skin Chameleon and much more from DnnModule.com
 
New Post
4/12/2012 5:48 AM
 

Excellent code snippet!  Thanks. 

I got this to work by just hovering my mouse over the registration link in the skin to get the URL, then used that URLin my code (I added a return_url to it), placed it on a button click handler; and the registration form popped up on its own.  Yours  is much more elegant though!

This also works for the native DNN log in module.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPop Up DNN Registration Control from ModulePop Up DNN Registration Control from Module


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