Questions tagged as 'razor'

2
answers

@ Html.DropDownList () Does not show the selected value of the ViewData ["something"]

I have a SelectListItem and in an element I put Selected = true, but when passing this object to razor in an @ Html.DropDownList () it does not recognize the selected element. This is how I have it in my view Razor @Html.DropDownList(...
asked by 29.05.2017 / 19:36
1
answer

Change the value of a checkbox id MVC4

I have a problem with my view checkboxes, and I can not understand how I can take all the values that are selected and send them to the controller to be able to operate with them. I have the following: Vista. @model List<Model.ofertas_co...
asked by 11.07.2016 / 11:32
2
answers

List Dropdownlist dependent or Married - Visual.Net -MVC

I would like to know how to use dependent Dropdownlist, for example that the CITY depends on the REGION, and that of the COUNTRY. I am currently using this way of working when listing a dropdownlist: In the controller;      Function Update...
asked by 12.07.2016 / 03:14
2
answers

Register registration MVC

I am working on a MVC project public class EmpleadoController : Controller { private readonly SdEmpleado _empleadoRepository = new SdEmpleado(); // GET: Empleado public ActionResult Index() { return View(); }...
asked by 05.09.2016 / 06:07
1
answer

Why does not the [DataType (DataType.Password)] work for me?

I have a model CredencialesViewModel which has a property Pwd type string add the decorator type data, but in the view does not render a input type password if not that one type text. / p> Why will this be?     
asked by 12.06.2018 / 21:43
1
answer

C # Razor HTMLHelper Dropdown

Friends I'm doing a drop down list with Razor and I'm trying to get the drop values, but I only get the name that I put in place of their values someone could guide me or tell me where I am wrong? [HttpPost]...
asked by 17.05.2018 / 18:22
1
answer

Hide @ Html.ActionLink in @foraech with Razor

My problem is that I want to hide the @Html.ActionLink from this view: <table class="table"> <tr> <th> @Html.DisplayNameFor(model => model.Subject.Name) </th> <th> @Html.DisplayNameF...
asked by 03.04.2018 / 03:03
1
answer

Add dll reference from one project to another visual studio 2013 c #

I have a solution with 6 projects. Web mvc Web services Business DAL Entities Infrastructure The infrastructure one has added a dll in several others of System.Web.Mvc Business uses infrastructure therefore has the dll as a reference. In the...
asked by 20.09.2017 / 23:43
1
answer

Multi Models in an ASP NET MVC view

Hi, I'm new to C # and MVC ASP NET and I have the following complication. I'm trying to flatten the data of different models in a single view to use this data in a form, to all this I found that I can (mix?) Two models or more in a parent model...
asked by 11.09.2017 / 23:16
1
answer

Path not found in my @ Html.Action

I have an action child, which I use to invoke a view in a layout, but when using the @ HTML.Action , it tells me that the controller that happened to it has not been found. <li class="dropdown"> <a href="#"...
asked by 26.06.2017 / 20:04