I'm new to razor and .net, i have a page on an ASP Net Razor project where i popup a modal with a form inside. Inside the form there is a datepicker and i want to set the system date when the page loads and evenly keep it editable. i've already tried with
@{ string dateNow = DateTime.Now.ToString("dd MM yyyy"); }<input asp-for="intervento.Data" class="form-control" type="date" value="@dateNow" />
it retrieves the correct date but can't display it. how can i solve this?