Questions tagged as 'razor'

1
answer

Add Class DropDownListFor

How do I insert @class="form-control" into the code below? <div class="form-group"> <label for="disabledSelect" class="control-label col-md-2">Status:</label> <div class="col-md-10"> @Htm...
asked by 21.06.2018 / 16:35
1
answer

What is the "asp-fallback" in ASP.NET MVC, Razor Pages?

I see some files as lines similar to this: <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"asp-fallback-src="~/lib/jquery/dist/jquery.min.js" asp-fallback-test="window.jQuery" crossorigin="anonymous"...
asked by 01.03.2018 / 01:56
1
answer

Problem with form submission

I'm having trouble trying to make a submit of a form when my object is null as it is not mandatory. But you can not save it null. /// Model public class Atividade { public virtual long Id { get; set; } [Display(Name = "Descrição")]...
asked by 22.02.2018 / 17:52
1
answer

How to sort the dropdownlist?

How can I sort the DropdownList ? <div class="form-group"> @Html.LabelFor(model => model.id_pessoa, "Pessoa", htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10">...
asked by 18.06.2017 / 16:27
1
answer

Table within View

I'm putting a table inside the Edit view. Edit View (Contract) @if (Model.ContratoParcela.Any()) { <table class="table parcela-lista"> @foreach (var parcela in Model.ContratoParcela) { <tr>...
asked by 26.04.2017 / 03:50
1
answer

Alignment layout divs cshtml Asp.net MVC?

Good afternoon! Dear, I am a beginner in the area of development and I have a little doubt. I have an ASP.Net MVC 5 project, where I have a layout inserted in my master page in _Layout.cshtml, follow the code below. <!DOCTYPE html> <h...
asked by 03.11.2016 / 17:19
1
answer

How to send the PartialView input to a controller?

I tried to find something that would get me this doubt, but there is nothing concrete for what I want. I'm using Visual Studio 2015 and MVC 5 and Razor in my project. I have a form (Create) with a submit in a partial view and I have this p...
asked by 15.12.2016 / 11:35
1
answer

how to get the value of a specific checkbox in asp.net mvc using JQuery

I have a table in a system in ASP.NET MVC that each record has a checkbox, here is the code below the view: <table class="table table-hover table-striped" id="tabelaProdutos"> <thead> <tr> <th>Tipo de Produt...
asked by 15.07.2016 / 15:12
1
answer

Show items according to click

In my view I have 5 partials that must be rendered. I needed that clicking one is shown and the others are hidden ... It's in this structure: <ul class="nav nav-tabs"> <li class="active"><a href="#cliente">Clie...
asked by 30.05.2016 / 04:28
1
answer

Thousands separator

How could I put thousands separator in a textBoxFor() ? Example: Value entered in View 1.321 (The point is only to facilitate visually) and the controller would receive the value 1321 to insert into the base. My field is...
asked by 21.12.2015 / 18:21