c# – 如何使用USPS验证给定的地址?

我想验证给予的地址(地址,城市,州,邮政编码)给usps并返回结果,如果提供的地址是一个有效的地址.并且如果不是有效地址返回无效地址.

那么我如何在C#.Net中做到这一点.

解决方法

here
///Create a new instance of the usps Manager class
///The constructor takes 2 arguments,the first is
///your usps Web Tools User ID and the second is 
///true if you want to use the usps Test Servers.
uspsManager m = new uspsManager("YOUR_USER_ID",true);
Address a = new Address();
a.Address2 = "6406 Ivy Lane";
a.City = "Greenbelt";
a.State = "MD";

///By calling ValidateAddress on the uspsManager object,///you get an Address object that has been validated by the
///usps servers
Address validatedAddress = m.ValidateAddress(a);

相关文章

在要实现单例模式的类当中添加如下代码:实例化的时候:frmC...
1、如果制作圆角窗体,窗体先继承DOTNETBAR的:public parti...
根据网上资料,自己很粗略的实现了一个winform搜索提示,但是...
近期在做DSOFramer这个控件,打算自己弄一个自定义控件来封装...
今天玩了一把WMI,查询了一下电脑的硬件信息,感觉很多代码都...
最近在研究WinWordControl这个控件,因为上级要求在系统里,...