API
HI I WANT TO FETCH CITY,STATE AND COUNTRY AUTOMATICALLY WHEN USER ENTERS PINCODE INTO TEXTBOX AND ALL THE TEXTBOXE'S OF RESPECTIVE CITY,STATE,COUNTRY SHOULD BE FILLED HOW CAN I DO IT...PLEASE GIVE SOME EXAMPLE TO IT AND I WANT IT IN WEBFORM AND NOT MVC...THANK YOU!
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pradeep ShetRank #595 · 4K reputationPosted Mar 19, 2015, 12:41 PM EDT
Follow the steps as mentioned -
1) Create a webservice or webapi which will accept pincode as input and return class which will have 3 properties City, State, Country.
2)On blur event of Pincode textbox call javascript function eg- FillAddress();
3) In this function, make a jquery ajax i.e- $.ajax(url,data) call to webservice which you have already created.
4)On success method of $.ajax, you will get the response. Set the appropriate property to City/State/Country textbox.
Hope this helps you. Do let me know in case you stuck anywhere. You will get lots of stuff about writing webservice / $.ajax() in google.
Anjali C64 reputationPosted Mar 19, 2015, 9:12 PM EDT
Thank You!
Pradeep ShetRank #595 · 4K reputationPosted Mar 19, 2015, 11:26 PM EDT
Anjali C64 reputationPosted Mar 20, 2015, 6:42 AM EDT