Questions tagged as 'razor'

1
answer

ASP.NET RAZOR - WEBSITE project running on IIS (Homologation or Production) does not contain the HEAD TAG

I have a problem in my WEB project, which when run by an IIS from a server, tag html HEAD does not appear closed and when executed locally it appears correctly. Detail, when inspecting element in the browser it appears, but when pr...
asked by 28.03.2018 / 21:18
1
answer

Helpers source code

Help source codes like TextBoxFor, for example, are available somewhere? I've already found customizations like this: public static System.Web.Mvc.MvcHtmlString DtxTextBoxFor<TModel, TValue> (this System.Web.Mvc.HtmlHelper<...
asked by 23.03.2018 / 14:29
1
answer

ViewBag and ViewData

I'm starting a career in development, and in the project here, I found a ViewData being used, and through my searches I can not update it in a ActionResult in the controller. I ended up testing with a ViewBag too, where I wa...
asked by 27.03.2018 / 16:13
0
answers

The sequence does not contain elements just inside the menu

I made an ASP.NET MVC application that receives some data via API, handles and displays on the screen. The data is correctly received, and I can display them normally, except for one place: The menu for mobile devices within _layout.cshtml...
asked by 09.03.2018 / 20:57
1
answer

Refresh DropDownListFor on form

I have a form that has two @Html.DropDownListFor and other fields. But when I change the first DropDownListFor I need to update the values of the other dropdownlist by passing its id as parameter ... @model EP.IdentityIsolation.Domain.Entiti...
asked by 07.02.2018 / 20:35
0
answers

How to apply the bootstrap v4 form input validation classes with the ASP.NET Razor syntax?

Follow the code below: View: <div class="form-group"> @Html.LabelFor(m => m.Telefone, new { @class = "font-weight-bold" }) @Html.TextBoxFor(m => m.Telefone, new { @class = "form-control", @placeholder = "Digite seu telef...
asked by 27.01.2018 / 17:05
0
answers

Binding wrong on select ASP.NET MVC option

When I give a form post to Controller , the binding on asp-for="VehiclePlate" takes value from option from select ( @vehicle.Category ). However, I want to get the text of option of select...
asked by 21.12.2017 / 17:02
0
answers

Doubt in the html.Dropdownlist powered by a ViewBag

I'm having the following problem: I need to send, instead of Id of ViewBag , Municipio , which is contained in ViewBag.Cidades . How do I change from Id to Municipio when I click Search to send the municipality...
asked by 29.11.2017 / 21:10
0
answers

How can I use CSHTML (Razor) in ASPX WebForm projects?

I was taking a look at in this question in English Stackoverflow, because I really find it very confusing to use the ASPX files and I find the Razor syntax more friendly. When trying to add a file with the extension .cshtml the proje...
asked by 01.12.2017 / 12:43
1
answer

How can I mount an upload page, which can receive photos, video and zip packages containing photos and / or videos?

I am like an application where the registered user has a page of uploads of images and videos and wanted to know if he has, as well as receiving photos and videos by uploads, if I can receive zips packages with photos and videos, where applicati...
asked by 16.10.2017 / 00:47