How would I do this? Here is the code that spits out the shipping estimator.
Code: Select all
<%-- <label class="cartlabels">Estimate shipping: </label> --%>
<uc1:BasketShippingEstimate ID="BasketShippingEstimate1" runat="server" />
Thanks!
Code: Select all
<%-- <label class="cartlabels">Estimate shipping: </label> --%>
<uc1:BasketShippingEstimate ID="BasketShippingEstimate1" runat="server" />
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
string clientIPAddress = Request.ServerVariables["REMOTE_ADDR"];
this.Visible = IsValidIP(clientIPAddress);
}
protected bool IsValidIP(string ipAddress)
{
bool isValid = true;
//YOUR CUSTOM IP VALIDATION CODE HERE FOR EXAMPLE
isValid = (ipAddress != "---.---.---.---");
return isValid;
}