1

Topic: How to obtain the data from the partial representation

Hello respected!
Forgive for, most likely, not exact questions! Only I study! I simplify the task to a minimum to learn only that I can not understand.
There is a controler, in it a method causing . It in turn contains three partial representations.
In a method of the controler I fill ViewBag. Part1, ViewBag. Part2, ViewBag. Part3 three results  from a DB also I cause the main representation. Partial at me through @foreach (var item in ViewBag. Part1 (2,3)) build the table, in each of lines I add a column with a field <input id = item. Id name = "returnValuePart1 (2,3)" type = "number" min = "0" value = "0"/> for data input.
How to me after Post submit the main representation to receive in the controler all values entered in all returnValuePart1 (2,3) which are allocated in the partial? Moreover also it would be desirable them item. Id to have...
Tried in method HTTPPost of the controler as input parameters to deliver int [] returnValuePart1, int [] returnValuePart2, int [] returnValuePart3. But they empty come...
And one more question, forgive! Opening this representation, I look in the console, and there at change of my value input, in the console all the same shows a zero... And should be?

2

Re: How to obtain the data from the partial representation

It is not necessary through ViewBag
Make normally - the model containing all data, necessary to representation
Then also problems with post th will be less
Do not save on matches

3

Re: How to obtain the data from the partial representation

Thanks for the answer!!!
And prompt as to be here with what: we give an example as though models;
public int Id {get; set;}
public string Name {get; set;}
public int Count {get; set;}
And an essence that here in what, I should deduce a part of values (we tell TOP 10) and by means of mine input to change Count () and to write down them reversely at Post.
Once again excuse, I will repeat that I only start to study. I could not transfer a context of model in the partial representation at all... But speech yet about it.

4

Re: How to obtain the data from the partial representation

The too general question. Take the textbook and read, to study at random the bad idea.
At same Frimana to itself operation with paging is quite described.

5

Re: How to obtain the data from the partial representation

Thanks for council! I will mandatory use!

6

Re: How to obtain the data from the partial representation

The book of Frimena - "ASP.NET Core MVC with examples on C# for professionals".
Here so I will simply ask - "And a forum then for whom?"

7

Re: How to obtain the data from the partial representation

Moroff wrote:

Here so I will simply ask - "And a forum then for whom?"

you consider, what the forum is alternative to the textbook? What for you here interactive courses will messages? What does the forum cancel search in Google?
If there are specific questions, a specific problem, you publish the code, specify, what exactly does not work that you expected, and we help to find an error or we prompt where to dig.

8

Re: How to obtain the data from the partial representation

For you can seem that any your question has the unambiguous interpretation. That you only begin, you do not see ten more which can arise at us in a head.
So do not hesitate to paint explicitly a question, to give code samples, not to forget them to make out by means of tags. Do not feel sorry for gaps and , and that a question continuously stated by one paragraph, it is very inconvenient to assort.
As to me to issue the message?

9

Re: How to obtain the data from the partial representation

Moroff wrote:

Knizhka Frimena - "ASP.NET Core MVC with examples on C# for professionals".
Here so I will simply ask - "And a forum then for whom?"

It I will not simply ask. You it is explicit on something hint:-Q