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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...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

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
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

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Detecting userDetecting user's country


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