I'm trying to generate view using t4 file. In this file I know how to get the view name by using Model.ViewName but I don't know how to get this Model name. My code is below:
@using (Html.BeginForm("<#= Model.ViewName #>", "What should I but here to get Model Name", FormMethod.Post, new { @class = "form" })
Thanks in advance for any help.
尝试<#= Model.ViewDataType.Name #>
您还应该尝试<#= Model.ViewDataTypeName #>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.