我想学习并为我的代码添加验证但是我有这个错误。 https://docs.microsoft.com/en-us/aspnet/web-pages/overview/ui-layouts-and-themes/4-working-with-forms 我从中吸取了教训。并将信息添加到我的基于ContosoUniversity的项目
@page
@model Proj_s.Pages.Projects.CreateModel
@{
ViewData["Title"] = "Create";
{
if (IsPost)
{
string companyname = Request.Form["companyname"];
string contactname = Request.Form["contactname"];
// int employeecount = Request.Form["employees"].AsInt();
}
}
}
我该如何更改?我将VS2017与ASP.NET Web Pages 2一起使用