| Subjects |
Hubs | Hubbers | Topics | Request |
| #1 in Business | Subscribe Email Print |
|
You are here: Home > Internet and Businesses Online > Web Development > Redirect Web Visitors By Country Using .NET Framework in C# or VB.NET |
|
Subjects - Redirect Web Visitors By Country Using .NET Framework in C# or VB.NET
There are times when it is useful to redirect a visitor to different default web page based on the visitor's country of origin. One practical usage is to redirect visitor to web page with the language re According to USFDA, a combination product is one composed of any combination of a drug and device; biological product and device; drug and biological product cognized by the visitor. This article shows you how by using .NET component, it can be done. Let us take a simple case study. Company XYZ is multi-national company with major customers from United Stat ; or drug, device, and biological product and fixed dose combination would include two or more combinations of drug. Examples of combination products may in s and Japan. The company official website is developed in both English and Japanese languages. The default page is in English language and visitor can switch to Japanese by changing the default language lude drug-coated devices, drugs packaged with delivery devices in medical kits, and drugs and devices packaged separately but intended to be used together. ption. There exists a potential problem when a Japanese visitor does not understand English and it could not navigate the web site. So let us develop a simple solution to help Company XYZ redirecting all here is enormous increase in the number of combination products entering the market in the recent years. Combination products have proven advantages but fixe Internet traffic from country Japan to the Japanese language site. Meanwhile it drives the rest traffic to English site. In this example, we use a fully functional IP2Location™ .NET component available d dose combinations are still in the process of convincing regulatory authority on their advantages over the single ingredient formulations. Combination pro t http://www.ip2location.net/download/IP2LocationDotNetComponent.ZIP to query country by visitor's IP address. Firstly, install the IP2Location™ .NET component. The IP2Location™ .NET component will be in ucts have become life saving products for the pharmaceutical companies who doesn’t have many innovative molecules in their product pipeline and have been inc talled in your local drive. Next, get the IP2Location.DLL .NET component and sample database from the directory, ie. c:Program FilesIP2Location by default. You need to add a reference to this component f easingly used in the product life cycle management. Even the companies having product patents are trying to extend their product life cycle through the combi om your Visual Studio web project. A copy of this component will be copied into /bin directory under the project. For unregistered component, there is a random 5-second delay in one out of ten queries. nation products and maximize the revenues. But the companies involved in this practice are overlooking that they are burdening the patients both economically et's assume the English web page as index_en.htm and Japanese web page as index_jp.htm. We implement a simple script default.asp to detect visitor's country of origin. If the visitor is from Japan, then and physically. They need to rightly judge the benefits of the combination products and they have to even look at the risks involved when combining the produ edirect him/her to index_jp.htm, otherwise index_en.htm. Simple? Here is the code and the comments serve as explanation default.asp. Sample Codes in VB.NET Webform ------------------------------ Impor ts. Some of the combination products were well accepted by physicians while others suffered. Companies involved in development of combination products are fi s IP2Location
Private Sub Query(ByVal strIPAddress As String) Dim oIPResult As New IP2Location.IPResult Try If strIPAddress <> "" Then IP2Location.Component.IPDatabasePath = "C:\Program Files\IP2Loc ding difficulty in defining their combination products and facing various challenges from selecting a combination to marketing it. Following aspects would a tion\Database\IP-COUNTRY.SAMPLE.BIN" oIPResult = IP2Location.Component.IPQuery(strIPAddress) Select Case oIPResult.Status Case "OK" If oIPResult.CountryShort = "JP" Then ' Visitor is from Japan ' R dd to the challenges in developing combination products: Which markets to tap where the combination products can do fairly well? Which combination prod direct the URL to index_jp.htm Response.Redirect("index_jp.htm") Else ' Visitor is not from Japan ' Redirect the URL to index_en.htm Response.Redirect("index_en.htm") End If Case "EMPTY_IP_ADDRESS cts are meaningful and rational? Which therapeutic categories to select? Which Combinations can address unmet needs of the patients? Do combin Response.Write("IP Address cannot be blank.") Case "INVALID_IP_ADDRESS" Response.Write("Invalid IP Address.") Case "MISSING_FILE" Response.Write("Invalid Database Path.") End Select Else Respons tions increase the patient compliance? What would be the developing cost? How to tackle the risks encountered during combination product developmen .Write("IP Address cannot be blank.") End If Catch ex As Exception Response.Write(ex.Message) Finally oIPResult = Nothing End Try End Sub Sample Codes in C# Webform -------------------------- U t? As combination products don't fit into the traditional categories of drugs, medical devices, or biological products, the USFDA is in the process of devel ing IP2Location;
private void Query(string strIPAddress)
{ IPResult oIPResult = new IP2Location.IPResult(); try { if (strIPAddress != "") { IP2Location.Component.IPDatabasePath = "C:\Program File ping new procedures for reviewing their safety, efficacy and quality. Professional from academic institutions, pharmaceutical industries, health care indust \IP2Location\Database\IP-COUNTRY.SAMPLE.BIN";
oIPResult = IP2Location.Component.IPQuery(strIPAddress); switch(oIPResult.Status.ToString()) { case "OK": if (oIPResult.CountryShort == "JP") { Respons y and representatives from various regulatory agencies are working out to design the regulatory requirements for manufacture and sale of combination products .Redirect("index_jp.htm") } else { Response.Redirect("index_en.htm") } break; case "EMPTY_IP_ADDRESS": Response.Write("IP Address cannot be blank."); break; case "INVALID_IP_ADDRESS": Response.W . As there is an increasing trend of the combination products companies manufacturing such products should be able to tackle the problems involved in the de ite("Invalid IP Address."); break; case "MISSING_FILE": Response.Write("Invalid Database Path."); break; } } else { Response.Write("IP Address cannot be blank."); } } catch(Exception ex) { elopment. They need to be wiser in analyzing the market trends and the regulatory requirements. Companies that provide selfless information through particip esponse.Write(ex.Message); } finally { oIPResult = null; } } Compile and upload this project to the web site. All visitors will go through this screening before redirect to an appropriate web page tion in industry events and feedback to regulatory authorities would be able to face the challenges and will be successful in developing combination products
HTTP = HTML link (for blogs, profiles,phorums):
Related Articles:Creating HTML Email Newsletters A Custom Logo Design That Leaves an Impression
|