Rename `MvcTagHelpersWebSite` to `HtmlGenerationsWebSite`
- name was too specific and I am about to add another HTML helper scenario
This commit is contained in:
parent
eefa582069
commit
261975b0bc
2
Mvc.sln
2
Mvc.sln
|
|
@ -102,7 +102,7 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CompositeViewEngineWebSite"
|
|||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ValueProvidersWebSite", "test\WebSites\ValueProvidersWebSite\ValueProvidersWebSite.xproj", "{14F79E79-AE79-48FA-95DE-D794EF4EABB3}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MvcTagHelpersWebSite", "test\WebSites\MvcTagHelpersWebSite\MvcTagHelpersWebSite.xproj", "{920F8A0E-6F7D-4BBE-84FF-840B89099BE6}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HtmlGenerationWebSite", "test\WebSites\HtmlGenerationWebSite\HtmlGenerationWebSite.xproj", "{920F8A0E-6F7D-4BBE-84FF-840B89099BE6}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ActionResultsWebSite", "test\WebSites\ActionResultsWebSite\ActionResultsWebSite.xproj", "{0A6BB4C0-48D3-4E7F-952B-B8917345E075}"
|
||||
EndProject
|
||||
|
|
|
|||
|
|
@ -9,19 +9,19 @@ using System.Net.Http;
|
|||
using System.Net.Http.Headers;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using HtmlGenerationWebSite;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Mvc.TagHelpers;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.WebEncoders;
|
||||
using MvcTagHelpersWebSite;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.FunctionalTests
|
||||
{
|
||||
public class MvcTagHelpersTest
|
||||
public class HtmlGenerationTest
|
||||
{
|
||||
private const string SiteName = nameof(MvcTagHelpersWebSite);
|
||||
private static readonly Assembly _resourcesAssembly = typeof(MvcTagHelpersTest).GetTypeInfo().Assembly;
|
||||
private const string SiteName = nameof(HtmlGenerationWebSite);
|
||||
private static readonly Assembly _resourcesAssembly = typeof(HtmlGenerationTest).GetTypeInfo().Assembly;
|
||||
|
||||
private readonly Action<IApplicationBuilder> _app = new Startup().Configure;
|
||||
private readonly Action<IServiceCollection> _configureServices = new Startup().ConfigureServices;
|
||||
|
|
@ -30,13 +30,13 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
[InlineData("Index", null)]
|
||||
// Test ability to generate nearly identical HTML with MVC tag and HTML helpers.
|
||||
// Only attribute order should differ.
|
||||
[InlineData("Order", "/MvcTagHelper_Order/Submit")]
|
||||
[InlineData("OrderUsingHtmlHelpers", "/MvcTagHelper_Order/Submit")]
|
||||
[InlineData("Order", "/HtmlGeneration_Order/Submit")]
|
||||
[InlineData("OrderUsingHtmlHelpers", "/HtmlGeneration_Order/Submit")]
|
||||
[InlineData("Product", null)]
|
||||
[InlineData("Customer", "/Customer/MvcTagHelper_Customer")]
|
||||
[InlineData("Customer", "/Customer/HtmlGeneration_Customer")]
|
||||
// Testing InputTagHelpers invoked in the partial views
|
||||
[InlineData("ProductList", null)]
|
||||
// Testing MvcTagHelpers invoked in the editor templates with the HTML helpers
|
||||
// Testing MVC tag helpers invoked in the editor templates from HTML helpers
|
||||
[InlineData("EmployeeList", null)]
|
||||
// Testing SelectTagHelper with Html.BeginForm
|
||||
[InlineData("CreateWarehouse", null)]
|
||||
|
|
@ -52,19 +52,19 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
[InlineData("Image", null)]
|
||||
// Testing InputTagHelper with File
|
||||
[InlineData("Input", null)]
|
||||
public async Task MvcTagHelpers_GeneratesExpectedResults(string action, string antiForgeryPath)
|
||||
public async Task HtmlGenerationWebSite_GeneratesExpectedResults(string action, string antiForgeryPath)
|
||||
{
|
||||
// Arrange
|
||||
var server = TestHelper.CreateServer(_app, SiteName, _configureServices);
|
||||
var client = server.CreateClient();
|
||||
var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8");
|
||||
var outputFile = "compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home." + action + ".html";
|
||||
var outputFile = "compiler/resources/HtmlGenerationWebSite.HtmlGeneration_Home." + action + ".html";
|
||||
var expectedContent =
|
||||
await ResourceFile.ReadResourceAsync(_resourcesAssembly, outputFile, sourceFile: false);
|
||||
|
||||
// Act
|
||||
// The host is not important as everything runs in memory and tests are isolated from each other.
|
||||
var response = await client.GetAsync("http://localhost/MvcTagHelper_Home/" + action);
|
||||
var response = await client.GetAsync("http://localhost/HtmlGeneration_Home/" + action);
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// Assert
|
||||
|
|
@ -98,11 +98,11 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
[InlineData("EditWarehouse", null)]
|
||||
[InlineData("Index", null)]
|
||||
[InlineData("Link", null)]
|
||||
[InlineData("Order", "/MvcTagHelper_Order/Submit")]
|
||||
[InlineData("OrderUsingHtmlHelpers", "/MvcTagHelper_Order/Submit")]
|
||||
[InlineData("Order", "/HtmlGeneration_Order/Submit")]
|
||||
[InlineData("OrderUsingHtmlHelpers", "/HtmlGeneration_Order/Submit")]
|
||||
[InlineData("Product", null)]
|
||||
[InlineData("Script", null)]
|
||||
public async Task MvcTagHelpers_GenerateEncodedResults(string action, string antiForgeryPath)
|
||||
public async Task HtmlGenerationWebSite_GenerateEncodedResults(string action, string antiForgeryPath)
|
||||
{
|
||||
// Arrange
|
||||
var server = TestHelper.CreateServer(_app, SiteName, services =>
|
||||
|
|
@ -114,13 +114,13 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
});
|
||||
var client = server.CreateClient();
|
||||
var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8");
|
||||
var outputFile = "compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home." + action + ".Encoded.html";
|
||||
var outputFile = "compiler/resources/HtmlGenerationWebSite.HtmlGeneration_Home." + action + ".Encoded.html";
|
||||
var expectedContent =
|
||||
await ResourceFile.ReadResourceAsync(_resourcesAssembly, outputFile, sourceFile: false);
|
||||
|
||||
// Act
|
||||
// The host is not important as everything runs in memory and tests are isolated from each other.
|
||||
var response = await client.GetAsync("http://localhost/MvcTagHelper_Home/" + action);
|
||||
var response = await client.GetAsync("http://localhost/HtmlGeneration_Home/" + action);
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// Assert
|
||||
|
|
@ -156,11 +156,11 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
// Arrange
|
||||
var server = TestHelper.CreateServer(_app, SiteName, _configureServices);
|
||||
var client = server.CreateClient();
|
||||
var outputFile = "compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Customer.Index.html";
|
||||
var outputFile = "compiler/resources/HtmlGenerationWebSite.HtmlGeneration_Customer.Index.html";
|
||||
var expectedContent =
|
||||
await ResourceFile.ReadResourceAsync(_resourcesAssembly, outputFile, sourceFile: false);
|
||||
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/MvcTagHelper_Customer");
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Customer/HtmlGeneration_Customer");
|
||||
var nameValueCollection = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string,string>("Number", string.Empty),
|
||||
|
|
@ -180,7 +180,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
|
||||
responseContent = responseContent.Trim();
|
||||
var forgeryToken =
|
||||
AntiForgeryTestHelper.RetrieveAntiForgeryToken(responseContent, "Customer/MvcTagHelper_Customer");
|
||||
AntiForgeryTestHelper.RetrieveAntiForgeryToken(responseContent, "Customer/HtmlGeneration_Customer");
|
||||
|
||||
#if GENERATE_BASELINES
|
||||
// Reverse usual substitution and insert a format item into the new file content.
|
||||
|
|
@ -476,14 +476,14 @@ Products: Laptops (3)";
|
|||
var expectedMediaType = MediaTypeHeaderValue.Parse("text/html; charset=utf-8");
|
||||
|
||||
var outputFile = string.Format(
|
||||
"compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Form.Options.AntiForgery.{0}.html",
|
||||
"compiler/resources/HtmlGenerationWebSite.HtmlGeneration_Home.Form.Options.AntiForgery.{0}.html",
|
||||
optionsAntiForgery?.ToString() ?? "null");
|
||||
var expectedContent =
|
||||
await ResourceFile.ReadResourceAsync(_resourcesAssembly, outputFile, sourceFile: false);
|
||||
|
||||
// Act
|
||||
// The host is not important as everything runs in memory and tests are isolated from each other.
|
||||
var response = await client.GetAsync("http://localhost/MvcTagHelper_Home/Form");
|
||||
var response = await client.GetAsync("http://localhost/HtmlGeneration_Home/Form");
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// Assert
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="/Customer/MvcTagHelper_Customer" method="post">
|
||||
<form action="/Customer/HtmlGeneration_Customer" method="post">
|
||||
<div>
|
||||
<label class="order" for="Number">Number</label>
|
||||
<input class="form-control input-validation-error" type="number" data-val="true" data-val-range="The field Number must be between 1 and 100." data-val-range-max="100" data-val-range-min="1" data-val-required="The Number field is required." id="Number" name="Number" value="" />
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Home/CreateWarehouse" method="post"> <div>
|
||||
<form action="/HtmlGeneration_Home/CreateWarehouse" method="post"> <div>
|
||||
<label class="warehouse" for="City">City</label>
|
||||
<input size="50" type="text" data-val="true" data-val-minlength="The field City must be a string or array type with a minimum length of '2'." data-val-minlength-min="2" id="City" name="City" value="" />
|
||||
<span class="field-validation-valid" data-valmsg-for="City" data-valmsg-replace="true"></span>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="/Customer/MvcTagHelper_Customer" method="post">
|
||||
<form action="/Customer/HtmlGeneration_Customer" method="post">
|
||||
<div>
|
||||
<label class="order" for="Number">Number</label>
|
||||
<input class="form-control" type="number" data-val="true" data-val-range="The field Number must be between 1 and 100." data-val-range-max="100" data-val-range-min="1" data-val-required="The Number field is required." id="Number" name="Number" value="" />
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="HtmlEncode[[/MvcTagHelper_Home/EditWarehouse]]" method="HtmlEncode[[post]]">
|
||||
<form action="HtmlEncode[[/HtmlGeneration_Home/EditWarehouse]]" method="HtmlEncode[[post]]">
|
||||
<div>
|
||||
HtmlEncode[[City_1]]
|
||||
<input type="HtmlEncode[[text]]" data-val="HtmlEncode[[true]]" data-val-minlength="HtmlEncode[[The field City must be a string or array type with a minimum length of '2'.]]" data-val-minlength-min="HtmlEncode[[2]]" id="HtmlEncode[[City]]" name="HtmlEncode[[City]]" value="HtmlEncode[[City_1]]" />
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Home/EditWarehouse" method="post">
|
||||
<form action="/HtmlGeneration_Home/EditWarehouse" method="post">
|
||||
<div>
|
||||
City_1
|
||||
<input type="text" data-val="true" data-val-minlength="The field City must be a string or array type with a minimum length of '2'." data-val-minlength-min="2" id="City" name="City" value="City_1" />
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Home/EmployeeList" method="post">
|
||||
<form action="/HtmlGeneration_Home/EmployeeList" method="post">
|
||||
<div>
|
||||
<label for="z0__Number">Number</label>
|
||||
<input data-val="true" data-val-range="The field Number must be between 1 and 100." data-val-range-max="100" data-val-range-min="1" data-val-required="The Number field is required." disabled="disabled" id="z0__Number" name="[0].Number" readonly="readonly" type="text" value="0" />
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{1}" /></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{1}" /></form>
|
||||
<form action="/HtmlGeneration_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<a title=""the" title" href="">Product List</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndex">MvcTagHelperTest Index</a>
|
||||
<a id="HtmlGenerationWebSite_Index">HtmlGenerationWebSite Index</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="HtmlEncode[[/]]">Default Controller</a>
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
<a href="">Produt Submit Fragment</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexFragment" href="HtmlEncode[[/#fragment]]">
|
||||
MvcTagHelperTest Index Fragment
|
||||
<a id="HtmlGenerationWebSite_IndexFragment" href="HtmlEncode[[/#fragment]]">
|
||||
HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="HtmlEncode[[ftp://localhost/#fragment]]">
|
||||
FTP MvcTagHelperTest Index Fragment
|
||||
FTP HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexProtocol" href="HtmlEncode[[/]]">
|
||||
Empty Protocol MvcTagHelperTest Index
|
||||
<a id="HtmlGenerationWebSite_IndexProtocol" href="HtmlEncode[[/]]">
|
||||
Empty Protocol HtmlGenerationWebSite Index
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<a title=""the" title" href="">Product List</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndex">MvcTagHelperTest Index</a>
|
||||
<a id="HtmlGenerationWebSite_Index">HtmlGenerationWebSite Index</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/">Default Controller</a>
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
<a href="">Produt Submit Fragment</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexFragment" href="/#fragment">
|
||||
MvcTagHelperTest Index Fragment
|
||||
<a id="HtmlGenerationWebSite_IndexFragment" href="/#fragment">
|
||||
HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="ftp://localhost/#fragment">
|
||||
FTP MvcTagHelperTest Index Fragment
|
||||
FTP HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexProtocol" href="/">
|
||||
Empty Protocol MvcTagHelperTest Index
|
||||
<a id="HtmlGenerationWebSite_IndexProtocol" href="/">
|
||||
Empty Protocol HtmlGenerationWebSite Index
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="HtmlEncode[[/MvcTagHelper_Order/Submit]]" method="HtmlEncode[[post]]">
|
||||
<form action="HtmlEncode[[/HtmlGeneration_Order/Submit]]" method="HtmlEncode[[post]]">
|
||||
<div>
|
||||
<label class="order" for="HtmlEncode[[Shipping]]">HtmlEncode[[Shipping]]</label>
|
||||
<input size="50" type="HtmlEncode[[text]]" id="HtmlEncode[[Shipping]]" name="HtmlEncode[[Shipping]]" value="HtmlEncode[[Your shipping method is UPSP]]" />
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Order/Submit" method="post">
|
||||
<form action="/HtmlGeneration_Order/Submit" method="post">
|
||||
<div>
|
||||
<label class="order" for="Shipping">Shipping</label>
|
||||
<input size="50" type="text" id="Shipping" name="Shipping" value="Your shipping method is UPSP" />
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="HtmlEncode[[/MvcTagHelper_Order/Submit]]" method="HtmlEncode[[post]]">
|
||||
<form action="HtmlEncode[[/HtmlGeneration_Order/Submit]]" method="HtmlEncode[[post]]">
|
||||
<div>
|
||||
<label class="HtmlEncode[[order]]" for="HtmlEncode[[Shipping]]">HtmlEncode[[Shipping]]</label>
|
||||
<input id="HtmlEncode[[Shipping]]" name="HtmlEncode[[Shipping]]" size="HtmlEncode[[50]]" type="HtmlEncode[[text]]" value="HtmlEncode[[Your shipping method is UPSP]]" />
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Order/Submit" method="post">
|
||||
<form action="/HtmlGeneration_Order/Submit" method="post">
|
||||
<div>
|
||||
<label class="order" for="Shipping">Shipping</label>
|
||||
<input id="Shipping" name="Shipping" size="50" type="text" value="Your shipping method is UPSP" />
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="get" action="HtmlEncode[[/MvcTagHelper_Home/ProductSubmit]]">
|
||||
<form method="get" action="HtmlEncode[[/HtmlGeneration_Home/ProductSubmit]]">
|
||||
<div>
|
||||
<label class="product" for="HtmlEncode[[HomePage]]">HtmlEncode[[HomePage]]</label>
|
||||
<input size="50" type="HtmlEncode[[url]]" id="HtmlEncode[[HomePage]]" name="HtmlEncode[[HomePage]]" value="HtmlEncode[[http://www.contoso.com/]]" />
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="get" action="/MvcTagHelper_Home/ProductSubmit">
|
||||
<form method="get" action="/HtmlGeneration_Home/ProductSubmit">
|
||||
<div>
|
||||
<label class="product" for="HomePage">HomePage</label>
|
||||
<input size="50" type="url" id="HomePage" name="HomePage" value="http://www.contoso.com/" />
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<form action="/MvcTagHelper_Product" method="post"> <div>
|
||||
<form action="/HtmlGeneration_Product" method="post"> <div>
|
||||
<label class="product" for="z0__HomePage">HomePage</label>
|
||||
<input size="50" disabled="disabled" readonly="readonly" type="url" id="z0__HomePage" name="[0].HomePage" value="http://www.contoso.com/" />
|
||||
</div>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{1}" /></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"><input name="__RequestVerificationToken" type="hidden" value="{1}" /></form>
|
||||
<form action="/MvcTagHelper_Home/Form" method="post"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -20,14 +20,15 @@
|
|||
"ContentNegotiationWebSite": "1.0.0",
|
||||
"ControllerDiscoveryConventionsWebSite": "1.0.0",
|
||||
"ControllersFromServicesWebSite": "1.0.0",
|
||||
"CorsWebSite": "1.0.0",
|
||||
"CorsMiddlewareWebSite": "1.0.0",
|
||||
"CorsWebSite": "1.0.0",
|
||||
"CustomRouteWebSite": "1.0.0",
|
||||
"ErrorPageMiddlewareWebSite": "1.0.0",
|
||||
"FilesWebSite": "1.0.0",
|
||||
"FiltersWebSite": "1.0.0",
|
||||
"FormatFilterWebSite": "1.0.0-*",
|
||||
"FormatterWebSite": "1.0.0",
|
||||
"HtmlGenerationWebSite": "1.0.0",
|
||||
"InlineConstraintsWebSite": "1.0.0",
|
||||
"JsonPatchWebSite": "1.0.0",
|
||||
"LoggingWebSite": "1.0.0",
|
||||
|
|
@ -41,7 +42,6 @@
|
|||
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
|
||||
"ModelBindingWebSite": "1.0.0",
|
||||
"MvcSample.Web": "1.0.0",
|
||||
"MvcTagHelpersWebSite": "1.0.0",
|
||||
"PrecompilationWebSite": "1.0.0",
|
||||
"RazorCompilerCacheWebSite": "1.0.0",
|
||||
"RazorEmbeddedViewsWebSite": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Areas.Customer.Controllers
|
||||
namespace HtmlGenerationWebSite.Areas.Customer.Controllers
|
||||
{
|
||||
[Area("Customer")]
|
||||
public class MvcTagHelper_CustomerController : Controller
|
||||
public class HtmlGeneration_CustomerController : Controller
|
||||
{
|
||||
public IActionResult Index(MvcTagHelpersWebSite.Models.Customer customer)
|
||||
public IActionResult Index(Models.Customer customer)
|
||||
{
|
||||
return View("Customer");
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ using Microsoft.AspNet.Mvc;
|
|||
using Microsoft.Framework.Caching;
|
||||
using Microsoft.Framework.Caching.Memory;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Components
|
||||
namespace HtmlGenerationWebSite.Components
|
||||
{
|
||||
public class ProductsViewComponent : ViewComponent
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Controllers
|
||||
namespace HtmlGenerationWebSite.Controllers
|
||||
{
|
||||
public class Catalog_CacheTagHelperController : Controller
|
||||
{
|
||||
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using HtmlGenerationWebSite.Models;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using MvcTagHelpersWebSite.Models;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Controllers
|
||||
namespace HtmlGenerationWebSite.Controllers
|
||||
{
|
||||
public class MvcTagHelper_HomeController : Controller
|
||||
public class HtmlGeneration_HomeController : Controller
|
||||
{
|
||||
private readonly List<Product> _products = new List<Product>
|
||||
{
|
||||
|
|
@ -48,7 +48,7 @@ namespace MvcTagHelpersWebSite.Controllers
|
|||
Products = new List<int> { 0, 1 },
|
||||
};
|
||||
|
||||
public MvcTagHelper_HomeController()
|
||||
public HtmlGeneration_HomeController()
|
||||
{
|
||||
_productsList = new SelectList(_products, "Number", "ProductName");
|
||||
_productsListWithSelection = new SelectList(_products, "Number", "ProductName", 2);
|
||||
|
|
@ -156,7 +156,7 @@ namespace MvcTagHelpersWebSite.Controllers
|
|||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
public IActionResult Link()
|
||||
{
|
||||
return View();
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using HtmlGenerationWebSite.Models;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using MvcTagHelpersWebSite.Models;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Controllers
|
||||
namespace HtmlGenerationWebSite.Controllers
|
||||
{
|
||||
public class MvcTagHelper_OrderController : Controller
|
||||
public class HtmlGeneration_OrderController : Controller
|
||||
{
|
||||
public IActionResult Submit(Order order)
|
||||
{
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using HtmlGenerationWebSite.Models;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using MvcTagHelpersWebSite.Models;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Controllers
|
||||
namespace HtmlGenerationWebSite.Controllers
|
||||
{
|
||||
public class MvcTagHelper_ProductController : Controller
|
||||
public class HtmlGeneration_ProductController : Controller
|
||||
{
|
||||
public IActionResult Index()
|
||||
{
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Customer : Person
|
||||
{
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Employee : Person
|
||||
{
|
||||
|
|
@ -6,7 +6,7 @@ using Microsoft.AspNet.Http;
|
|||
using Microsoft.AspNet.Http.Features.Internal;
|
||||
using Microsoft.AspNet.Http.Internal;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Folder
|
||||
{
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public enum Gender
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Person
|
||||
{
|
||||
|
|
@ -2,10 +2,9 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MvcTagHelpersWebSite.Models
|
||||
namespace HtmlGenerationWebSite.Models
|
||||
{
|
||||
public class Warehouse
|
||||
{
|
||||
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
using System.Threading;
|
||||
using Microsoft.Framework.Caching;
|
||||
using Microsoft.Framework.Caching.Memory;
|
||||
|
||||
namespace MvcTagHelpersWebSite
|
||||
namespace HtmlGenerationWebSite
|
||||
{
|
||||
public class ProductsService
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace MvcTagHelpersWebSite
|
||||
namespace HtmlGenerationWebSite
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ namespace MvcTagHelpersWebSite
|
|||
routes.MapRoute(
|
||||
name: "default",
|
||||
template: "{controller}/{action}/{id?}",
|
||||
defaults: new { controller = "MvcTagHelper_Home", action = "Index" });
|
||||
defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
|
||||
routes.MapRoute(
|
||||
name: "areaRoute",
|
||||
template: "{area:exists}/{controller}/{action}/{id?}",
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Warehouse
|
||||
@model HtmlGenerationWebSite.Models.Warehouse
|
||||
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<html>
|
||||
<body>
|
||||
@using (Html.BeginForm("CreateWarehouse", "MvcTagHelper_Home"))
|
||||
@using (Html.BeginForm("CreateWarehouse", "HtmlGeneration_Home"))
|
||||
{
|
||||
<div>
|
||||
<label asp-for="City" class="warehouse"></label>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Warehouse
|
||||
@model HtmlGenerationWebSite.Models.Warehouse
|
||||
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<html>
|
||||
<body>
|
||||
<form asp-controller="MvcTagHelper_Home" asp-action="EditWarehouse" asp-anti-forgery="false">
|
||||
<form asp-controller="HtmlGeneration_Home" asp-action="EditWarehouse" asp-anti-forgery="false">
|
||||
<div>
|
||||
@Html.DisplayFor(m => m.City)
|
||||
<input asp-for="City" type="text" />
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Employee
|
||||
@model HtmlGenerationWebSite.Models.Employee
|
||||
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@using HtmlGenerationWebSite.Models
|
||||
@model Gender
|
||||
@Html.RadioButtonFor(m => m, value: "Male") Male
|
||||
@Html.RadioButtonFor(m => m, value: "Female") Female
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@using MvcTagHelpersWebSite.Models
|
||||
@using HtmlGenerationWebSite.Models
|
||||
@model Gender
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
<input asp-for="@Model" type="radio" value="Male" /> Male
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@using MvcTagHelpersWebSite.Models
|
||||
@using HtmlGenerationWebSite.Models
|
||||
|
||||
@model List<Employee>
|
||||
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<body>
|
||||
@if (Model != null && Model.Count() != 0)
|
||||
{
|
||||
using (@Html.BeginForm("EmployeeList", "MvcTagHelper_Home", FormMethod.Post))
|
||||
using (@Html.BeginForm("EmployeeList", "HtmlGeneration_Home", FormMethod.Post))
|
||||
{
|
||||
for (int i = 0; i < Model.Count; ++i)
|
||||
{
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
@using Microsoft.Framework.DependencyInjection
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form asp-controller="HtmlGeneration_Home" asp-action="Form"></form>
|
||||
<form asp-controller="HtmlGeneration_Home" asp-action="Form" asp-anti-forgery="true"></form>
|
||||
<form asp-controller="HtmlGeneration_Home" asp-action="Form" asp-anti-forgery="false"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<a asp-controller="Product" asp-action="List" title='"the" title'>Product List</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndex">MvcTagHelperTest Index</a>
|
||||
<a id="HtmlGenerationWebSite_Index">HtmlGenerationWebSite Index</a>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Default Controller</a>
|
||||
|
|
@ -25,13 +25,13 @@
|
|||
<a asp-controller="Product" asp-action="Submit" asp-fragment="fragment">Produt Submit Fragment</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexFragment" asp-fragment="fragment">
|
||||
MvcTagHelperTest Index Fragment
|
||||
<a id="HtmlGenerationWebSite_IndexFragment" asp-fragment="fragment">
|
||||
HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index" asp-fragment="fragment" asp-protocol="ftp">
|
||||
FTP MvcTagHelperTest Index Fragment
|
||||
FTP HtmlGenerationWebSite Index Fragment
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a id="MvcTagHelperTestIndexProtocol" asp-protocol="">
|
||||
Empty Protocol MvcTagHelperTest Index
|
||||
<a id="HtmlGenerationWebSite_IndexProtocol" asp-protocol="">
|
||||
Empty Protocol HtmlGenerationWebSite Index
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@using MvcTagHelpersWebSite.Models
|
||||
@using HtmlGenerationWebSite.Models
|
||||
@model Folder
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Order
|
||||
@model HtmlGenerationWebSite.Models.Order
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Order Page";
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form asp-controller="MvcTagHelper_Order" asp-action="Submit" asp-anti-forgery=" true">
|
||||
<form asp-controller="HtmlGeneration_Order" asp-action="Submit" asp-anti-forgery=" true">
|
||||
<div>
|
||||
<label asp-for="Shipping" class="order"></label>
|
||||
<input asp-for="Shipping" type="text" asp-format="Your shipping method is {0}" size="50" />
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Order
|
||||
@model HtmlGenerationWebSite.Models.Order
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Order Page";
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
</head>
|
||||
<body>
|
||||
@* Use comments and <text/> elements to force whitespace in generated HTML. *@@using (
|
||||
Html.BeginForm(actionName: "Submit", controllerName: "MvcTagHelper_Order"))
|
||||
Html.BeginForm(actionName: "Submit", controllerName: "HtmlGeneration_Order"))
|
||||
{<text></text>
|
||||
<div>
|
||||
@Html.LabelFor(m => m.Shipping, htmlAttributes: new { @class = "order" })
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Product
|
||||
@model HtmlGenerationWebSite.Models.Product
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Product Page";
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form asp-controller="MvcTagHelper_Home" asp-route-action="ProductSubmit" asp-anti-forgery="false" method="get">
|
||||
<form asp-controller="HtmlGeneration_Home" asp-route-action="ProductSubmit" asp-anti-forgery="false" method="get">
|
||||
<div>
|
||||
<label asp-for="HomePage" class="product"></label>
|
||||
<input asp-for="HomePage" type="url" size="50" />
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@using MvcTagHelpersWebSite.Models
|
||||
@using HtmlGenerationWebSite.Models
|
||||
@model IEnumerable<Product>
|
||||
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
@using (@Html.BeginForm("Index", "MvcTagHelper_Product", FormMethod.Post))
|
||||
@using (@Html.BeginForm("Index", "HtmlGeneration_Product", FormMethod.Post))
|
||||
{
|
||||
var index = 0;
|
||||
var fieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Product
|
||||
@model HtmlGenerationWebSite.Models.Product
|
||||
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@model MvcTagHelpersWebSite.Models.Customer
|
||||
@model HtmlGenerationWebSite.Models.Customer
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Customer Page";
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<html>
|
||||
<body>
|
||||
<form asp-route-area="Customer" asp-controller="MvcTagHelper_Customer" asp-action="Index">
|
||||
<form asp-route-area="Customer" asp-controller="HtmlGeneration_Customer" asp-action="Index">
|
||||
<div>
|
||||
<label asp-for="Number" class="order"></label>
|
||||
<input asp-for="Number" type="number" class="form-control" />
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
HtmlGenerationWebSite
|
||||
===
|
||||
|
||||
This web site illustrates how to use MVC HTML and tag helpers.
|
||||
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 360 B |
|
|
@ -1,4 +0,0 @@
|
|||
@using MvcTagHelpersWebSite.Models
|
||||
@model Gender
|
||||
@Html.RadioButtonFor(m => m, value: "Male") Male
|
||||
@Html.RadioButtonFor(m => m, value: "Female") Female
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
@using Microsoft.Framework.DependencyInjection
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Form Tag Helper Test</h2>
|
||||
|
||||
<form></form>
|
||||
<form asp-controller="MvcTagHelper_Home" asp-action="Form"></form>
|
||||
<form asp-controller="MvcTagHelper_Home" asp-action="Form" asp-anti-forgery="true"></form>
|
||||
<form asp-controller="MvcTagHelper_Home" asp-action="Form" asp-anti-forgery="false"></form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
MvcTagHelpersWebSite
|
||||
===
|
||||
|
||||
This web site illustrates how to use MVC tag helpers.
|
||||
Loading…
Reference in New Issue