Can you please provide some detail? What do you exactly want to do?
how to display another page in modal and then post to that page?

打玻璃
1,591
Reputation points
I have user list page and create user page
index.cshtml(user list)
create.cshtml(create user)
and I want to display create page in index.cshtml in modal.
<div class="modal modal-lg">
<div class="modal-dialog">
---create.cshtml
</div>
</div>
if the form is submit in create.cshtml it will post to create.html not index.cshtml and just the modal closed but the index.cshtml not post and nothing change.
just the create.cshtml post to create.cshtml.cs and the index.cshtml do not change.
how to do it?
When you click the save button, It will post to
OnPost
method increate.cshtml.cs
, So you can justReturn RedirectToPage("index");
to redirect to
OnGet
method inindex.cshtml.cs
, Then the page will show the newest data.