How to create dynamic and smart address and timezone

Microsoft Live Service has an awesome contact information form under Account> Registered Information. First you are asked about your country and another contact form changes. For example, if you select "United States", the form fields will change to: Address 1, Address 2, City, State (drop-down from US states), Zip, Time Zone (drop-down from US time zones in a user-friendly form, for example , "Eastern Time (EST)").

If you select United Kingdom, the form fields will change to: Address 1, Address 2, Address 3, Second City, City, Country, Zip Code, Founding Country (dropdown), and Time Zone (dropdown).

This contact form provides the best user experience I have ever encountered in a contact form (I may be more sensitive, but the extended user experience excites me and I want to provide the same experience to my users).

Is there a way to create a form like this using VS 2008 / .NET 3.5? Is there a legal way to get my information database?

0


source to share


3 answers


As for getting the database, I'm not sure. Perhaps it's cataloged somewhere which fields are commonly used for each country.

When it comes to implementing these different forms for different countries, there are several solutions. It would be possible to have different user preferences or custom controls, one for each country that you want to offer a differentiated form. Each of these usercontrols will be a form, with text fields, etc. And he will know how to save his data.



Another way is to have this information (which country requires, what type of controls and labels) in some repository (database, xml file, etc.) and create these forms dynamically.

It can get quite complex and the "meta" is really fast, although it's a question of how complex you want it to be in terms of cost / benefit.

0


source


Most of the time, with systems that did these "tricks," they relied on information that was either available through careful searches or could be purchased from government agencies for a small fee. For example, the system I was using had a handy feature that, if you enter a zip code for a US address, it will look up values ​​from a database table that were populated from a list purchased from the US Postal Service.



In the case of what they have on their Windows Live account page, I'm going to guess it looks like this. They just have a relationship established for the country to assert itself to the city, etc. It would be great if there was a model that existed for humans, but as far as I know, it was rediscovered for every application.

0


source


Most of the address data is broken down into similar information anywhere in the world - a neat trick is labeling it for the destination locale ("Postal Code" and "Zip Code") and hiding the UI for irrelevant fields ("Founding Country", for example, wouldn't mean much for Luxembourg).

Development of "appropriate" fields / etc. and building a cross-reference for each country in your code should be relatively trivial

0


source







All Articles