How to create an order processing form in ASP.NET MVC and jQuery / JavaScript

I need help with the build page, where information is entered in the form at the top of the page, and then added to the grid under the form when the user clicks the "Add" button. The form will have drop-down boxes so that the drop-down text, not the index / id, should be displayed in the grid columns representing the selection. After entering all the data (a few lines in other words), the data is transferred to the server for processing.

Ideally, all data editing and verification should be performed on the client, that is, using JavaScript / jQuery and immediately sent to the server.

The second price is AJAX calls to the server for adding / editing / deleting positions on the corresponding button clicks / grid. Then I will also need a way to store data on the server for a specific session.

I am using ASP.NET MVC 1.0. and am no no with JavaScript / jQuery. I used the Telerik MVC grid in other sections of the site, so it would be great that I can stick to it, but not significantly :-)

Many thanks!

+3
source share
4 answers

Gerhard

It is a site that will help you get started by using jquery to send / receive data using postback.

http://encosia.com/

+3
source

, MVC 1 . ajax, MVC.

xVal .

.

, , , xVal , . JQuery, .

, , , .

MVC 2.0 , , , , MVC... , , , , MVC 2.0 .

0

Ajax - .

Ajax. , actionlink:

<%= Ajax.ActionLink("LinkText", "ActionName", "ControllerName", 
new { id = Model.ID }, 
new AjaxOptions() { UpdateTargetId = "DIV_ID" })%>

( ajax ), , , , create/edit.

using( Ajax.BeginForm("ActionName", new { id = Model.ID }, new AjaxOptions() { 
UpdateTargetId = "DIVToUpdateOnYourMainPage" }) )

- Ajax, DIV , ajax, , (DB) .

.

0

, , , (http://www.shawson.co.uk/codeblog/mvc-with-mvvm-using-knockout-js/) , -, ( ) js, knockoutjs, mvvm , . , , .

0

Source: https://habr.com/ru/post/1729856/


All Articles