Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Razor 中将以下表单/语法转换为 Html.BeginForm 语法
<form action="~/Handler1.ashx" method="POST" enctype="multipart/form-data">
认为你可以使用这个:
@Html.BeginForm(null, null, FormMethod.Post, new { @action="your_url_here", @enctype = "multipart/form-data" })
,或编写自己的 HTML 扩展(例如:BeginHandlerForm)