Call web-service on changeFocus or onChange of textfield in MVC's view

Hello there,

I am using ASP.NET MVC 1 with .NET 3.5 SP1.
I am trying to call a web-service whenever focus moves away from a textField and then populate another textField based upon the return value of web-service. i.e through Java script or something.

Secondly, I do not want to refresh the whole screen to display the result of called web-service. Is there a simple way to achieve the above 2 things.

Thanks
tech1guyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nomooseCommented:
Hi Tech1Guy,
The first can be accomplished by adding attributes to the texbox.  The following library suggested on stack overflow seems to accomplish this:
http://stackoverflow.com/questions/1200001/writing-custom-attribute-in-c-like-asp-net-mvc-authorize-attribute

The second can be accomplished using a MVC adaptation of an update panel from the ajax control toolkit.  Check out this link for more on that.
http://weblogs.asp.net/dwahlin/archive/2009/05/14/emulating-the-updatepanel-in-asp-net-mvc-1-0-with-ajaxhelper.aspx


Let me know if you need any more information,
Elliot
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Frameworks

From novice to tech pro — start learning today.