Questions tagged as 'razor'

1
answer

System.Web.Mvc.Web disappeared, what can I do?

After some updates, my helpers began to give problems, for example, if I were to use @Html.TexBoxFor , Razor would not recognize it. After searching a lot, I was asked to use @using System.Web.Mvc.Web in View that I was writing....
asked by 25.04.2014 / 19:39
2
answers

Load list of one type in a View of another type

I'm doing a professional registration and of course, my View is typed with this Model. However in the register I need to insert Specialization and Type (2 different models). These last 2 models need to come as lists and appear in checkboxes with...
asked by 08.05.2014 / 21:54
0
answers

Returning View from error after calling a pop up Modal

Hello, I have a problem with the front end of my application. I have the following method to return errors: public class ErrorController : Controller { //Erro 500 Servidor public ActionResult Index() {...
asked by 21.09.2018 / 16:17
0
answers

ASP.NET MVC - Change input to dropdown and popular with table values SQL Server

I have a partial view (in this case, one of those Razor Pages) of type "Create" created from a table in SQL Server (which is stored as entity of a template in my application). @model Candidaturas.Models.DadosPessoai @using (Html.BeginForm("A...
asked by 01.08.2018 / 18:39
0
answers

ASP Net MVC - Insert html helper into string and render via Html.Raw

Talk to people, I have the following situation: I have a list of links registered in the database, which will be loaded according to the user's profile. I'm currently forced to do this: @Html.Raw(listaMenusSistema[i].HtmlMenu); This w...
asked by 29.08.2018 / 20:06
2
answers

How to pass input value via post in asp.net core razor

I would like to know how to pass the value typed in an input to a Post method in PageModel. No cshtml: <div class="col-sm-6"> <label asp-for="Tickets.Identificador" class="control-label"></label> <input asp-for=...
asked by 18.06.2018 / 21:48
1
answer

Add DropDownList value to the database

I wanted to put dropdownlist in my view where its List value was for the database, but I know only how to add values to DropDownlist with data from a table, I wanted to make a DropDownlist with three values without having to...
asked by 06.06.2018 / 15:16
1
answer

Using eval to transform Razor to Javascript

Before criticizing the use of eval , I read and recommend this answer . Consider the following context: Home C # Code (Razor): var teste = new { prop1 = 123, prop2 = "minha mãe disse 'Háaaaaa!'" }; var listTeste = new object...
asked by 06.10.2017 / 00:15
0
answers

Problem using LabelFor Razor MVC 3 + C #

I have the following error in my View : when I pass @class="classe boot-strap" is not used, even passing View inside parameter @class it insists on using 'text-box single-line' , code snippets. Code Razor...
asked by 18.09.2017 / 21:51
1
answer

Problem when executing method to insert new User using ASP.NET MVC with HTML and RAZOR

I have a problem when executing a request to insert a new user, I do not know what I need to do now to finish my request, By clicking the register button nothing happens below are my HTML code and controller (Controller Name: UserController)...
asked by 21.08.2017 / 20:52