TwitterBootstrapMvc
TwitterBootstrapMvc copied to clipboard
Any examples how to use with AJAX?
Hi Dmitry,
I am quite excited to use your library. However, I make frequent use of AJAX and partials, but have no clue how to use your library with AJAX and your documentation, how shall I say it?, leaves much to be desired. It would be great to see a working example of how to implement something like the following:
@using (Ajax.BeginForm(new AjaxOptions { Url = Url.Action("GetUsersList"), UpdateTargetId = "targetDiv" })) {
... the form fields go here ... as well as a submit button ...
}
<div id="targetDiv">
... results returned from child action via AJAX would go here ...
</div>
How does this get coded with your TwitterBootstrapMVC extensions?
Thanks
Kelly Carpenter
it's very similar to the regular Bootstrap form:
@using (var f = Ajax.Bootstrap().Begin(new Form(), new AjaxOptions{}))
{
}
Thank you for your very quick response. Much appreciated.
This worked like a charm.
All the best!
From: Dmitry A. Efimenko [email protected] Sent: Wednesday, July 22, 2015 2:25 PM To: DmitryEfimenko/TwitterBootstrapMvc Cc: Kelly Carpenter Subject: Re: [TwitterBootstrapMvc] Any examples how to use with AJAX? (#388)
it's very similar to the regular Bootstrap form:
@using (var f = Ajax.Bootstrap().Begin(new Form(), new AjaxOptions{})) {
}
Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/388#issuecomment-123870819.