How do I handle autopoatback in ASP.NET MVC? Suppose I have a textbox. I enter a value in it, I need to check if the value exists in some table in the database. So in ASP.NET forms I can set AutoPostBack = true and handle the TextBox.TextChanged event. How do I do it here?
And what are the pros and cons of using ASP.NET server control in MVC?
There are no postbacks in ASP.NET MVC. What you need to do here is an AJAX call to a Controller action on the server.
Here’s an example http://www.hanselman.com/blog/ASPNETMVCPreview4UsingAjaxAndAjaxForm.aspx