N
N
Nikolai Retsinkevich2015-08-05 19:03:03
ASP.NET
Nikolai Retsinkevich, 2015-08-05 19:03:03

How to embed adding an element of one model in an ASP MVC add another model page?

Such situation. I have tables - Author and Article. A many-to-many relationship is implemented between them through an intermediate table.
All of this has been moved to VS 2013, to the MVC site project using the ADO.NET EDM. Automatic controllers were created, and then based on them, I created views. So here's the question:
I have my Create view for Article and for Author created automatically. I need to add Author elements directly on the Article creation page (and an unlimited number of times, if there are several authors). I created a PartialView for Create Author and pasted it into Create Article. But when I click on the create button (in the article view or the partial view of the Author), the server swears:

Не удалось расшифровать маркер защиты от подделки. Если приложение размещено в Web Farm или кластере, убедитесь, что на всех компьютерах работает одна и та же версия ASP.NET Web Pages, и что конфигурация <machineKey> явно задает ключи шифрования и проверки. AutoGenerate невозможно использовать в кластере.

I understand that I'm doing something wrong, but I have no experience in using MVC. How can I best accomplish my task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gamretsky, 2015-08-06
@rgamretsky

Does it work without partial view? at what stage does the problem occur? when adding to the database or at the time of processing by the controller?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question