DmitryEfimenko / TwitterBootstrapMvc

Fluent implementation of ASP.NET-MVC HTML helpers for Twitter Bootstrap.
Apache License 2.0
224 stars 79 forks source link

update partialview using Ajax.Bootstrap() #147

Closed fdsanto closed 10 years ago

fdsanto commented 10 years ago

Hi ! i'm trying to update only a specific partialview using the following code


Ajax.Bootstrap().ActionLinkButton("Quitar", "QuitarItem", "Venta", new AjaxOptions() { UpdateTargetId = "GridVentaPartialContainer" })

QuitarItem is the action that returns a PartialView("_GridVentaPartial", ventaViewModel); GridVentaPartialContainer is the div containing the partial view.. is this the right approach? currently this isn't working, it wrongly updates the entire view.

Once again thanks for all the help, you're giving great support!

Franco

DmitryEfimenko commented 10 years ago

It looks right. I just tested it, it works for me. Make sure that you have jquery.unobtrusive-ajax.js referenced on the page.

fdsanto commented 10 years ago

worked! you're a genius, thanks for all the magic!

can i ask a different question here ? i'm adding a change event to a BMVC textbox using jQuery on document ready, it works but i was wondering if there is a built-in feature on BMVC inputs for events listeners.. ?

thanks!

DmitryEfimenko commented 10 years ago

There is no built in event listeners in BMVC and to be honest, I prefer to keep them in a script file using JQuery, probably just like you have it. I believe it is easier to maintain code this way.

Closing the issue since it's all works for you now.