Assuming you have a web control with the following declaration,
...
<%@ Register TagPrefix="dnn"
TagName="Address"
Src="~/Controls/Address.ascx" %>
...
<dnn:Address id="addressControl" runat="server" />
...
you can restrict the countries in the code-behind like so:
using System.Linq;
...
private static readonly string[] Countries
= new[] { "Canada", "Mexico", "United States" };
...
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
var list = this.addressControl.FindControl("cboCountry")
as CountryListBox;
foreach (var item in list.Items.Cast<ListItem>().ToArray())
{
if (!Countries.Contains(item.Text))
list.Items.Remove(item);
}
}
Enjoy!