Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

"DRY" form tag uniformity in one component or partial view

$
0
0

I have a number of form tags that look similar:

<form asp-area=@ViewBag.Area asp-controller=@ViewBag.Controller asp-action=@ViewBag.Action asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">

It would be nice if I put everything in "<form ... >" into a "super ViewBag" or partial view so I have it all in one place in case of changes. I've unsuccessfully tried a number of ways. Any ideas?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>