First, in MVC there is no Code Behind.
Second, the manipulation of tabs, between dead and wounded, is an abstraction of a JS code applied to events within an HTML in a controlled way.
Third, it’s not unsafe to manipulate JS in ASP.NET MVC because it’s designed for this: so you can put JS at ease in your application without necessarily compromising security.
The way to communicate with the Controller
using AJAX events is implementing Actions
and calling these Actions
with components that implement this, like jQuery, for example. The idea of Microsoft doing this is to approach the new standard used by new Frameworks like Ruby on Rails, Django and Node.js, which are based only on the routes to search and/or process information.
There are a number of good components using JS and CSS that implement this, even better than AJAX Control Toolkit, such as Bootstrap and the Foundation.
Yes, that’s what I’m doing. I quoted code Behind as an example. I am calling the controls to bring the information via ajax and manipulate by jquery etc. I spoke in security because you can see the javascript code and manipulate its tabs since I am mounting the client side only with the information coming from the controller. Att. Is there any better way to mount these tabs on the server side and already bring the necessary in addition to the data to handle it on the client side ?
– Francisco Proença
There is. It’s a combination of
ActionResult
s withRemoteValidation
.– Leonel Sanches da Silva
Good, thanks, I’ll take a look at it.
– Francisco Proença