c# - How to validate the given address using USPS? -
i want validate given address (address, city, state, zip) usps , return result if provided address valid address. , if not valid address returns invalid address.
so how can in c#.net.
from here
///create new instance of usps manager class ///the constructor takes 2 arguments, first ///your usps web tools user id , second ///true if want use usps test servers. uspsmanager m = new uspsmanager("your_user_id", true); address = new address(); a.address2 = "6406 ivy lane"; a.city = "greenbelt"; a.state = "md"; ///by calling validateaddress on uspsmanager object, ///you address object has been validated ///usps servers address validatedaddress = m.validateaddress(a);
Comments
Post a Comment