A
A
avchizh2012-11-29 11:20:34
.NET
avchizh, 2012-11-29 11:20:34

knockoutmvc what is the best way to submit a form as a postback

If you follow the documentation

@using (ko.Html.Form("FooParametersAction", "Foo", new { value = 0, name = "Sanderson"}))
{
Display
}

then when submitting the form flies away via AJAX, which I don't always need . If you make a standard form, but use KO controls, then for some reason they do not have a name and you have to manually add it to get the data on the server.

Perhaps someone knows just to send the form with the model to the server using KO?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SychevIgor, 2012-11-30
@SychevIgor

I think here few people write on exotic technologies such as knockout. So, it's better to ask on stackoverflow or on the forum of developers of this library

A
Alex Shkor, 2013-01-29
@AlexShkor

We used KnockoutMVC, but in the end decided to abandon it. At that time, the Form could only be sent via ajax. If you want to really fully use knockout.js, then I advise you to write right away on it too.

A
Alex Shkor, 2013-01-29
@AlexShkor

Here's how I can share my razor helpers with you.
github.com/AlexShkor/knockout-razor-helper-methods

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question