views:

48

answers:

1

I need to update an element on the page based on what the user is typing, while the user is typing (i.e. without having the user to click submit buttons). Similar to how StackOverflow does the preview of the question, but I need data from the server to update the element, hence the postback requirement.

What is the best way to get this done? Thanks!

A: 

There is no postback in MVC. Instead of postback you should make an ajax request using jquery to get data from server.

Examples of MVC + jquery JSON ajax request can be found here and here.

ŁukaszW.pl