HomeHomeGetting StartedGetting StartedNew to DotNetNu...New to DotNetNu...Detecting userDetecting user's country
Previous
 
Next
New Post
5/15/2012 6:12 AM
 

Hi,

I have been asked to set up 2 home pages and have the user redirected to one or the other depending on his country location, this is before he has logged in so is there anything in the API  I can use to get the user's country before he has logged in ?

Hope you can help.

JHF

 
New Post
5/15/2012 4:35 PM
 
there isnt an API method though there is a webcontrol (CountryListBox) which you can find at Library\Controls\CountryListBox\CountryListBox.cs that you could borrow the code from
 
New Post
5/15/2012 9:25 PM
 

Great, thanks Cathal,

I will have a look at that code today :)

 JHF

 
New Post
5/16/2012 6:18 AM
 

Hi,

Thanks, that will help a lot looks good, I have had a rethink about the way I am going to do this different content for countries and am looking at using Content Dejour, which is fine proving the person has logged in.

I am trying to get a country drop down on the first page for the user to select but currently only get an empty dropdown control.

I have the following in my ascx

<%@ Register TagPrefix="wc" Namespace="DotNetNuke.UI.WebControls" Assembly="CountryListBox" %>

and further down.

<wc:CountryListBox TestIP="" LocalhostCountryCode="US" id="cboCountry" DataValueField="Value" DataTextField="Text" AutoPostBack="True" runat="server" /> but have a blank drop down.

Any help please ?

JHF.

 
New Post
5/16/2012 5:16 PM
 
you need to bind the list of country names - check Library\UI\UserControls\Address.cs, the load method shows getting the list of countries and doing the bind
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DotNetNu...New to DotNetNu...Detecting userDetecting user's country


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.