Questions tagged as 'asp.net-mvc'

3
answers

HTTP Error 404.0 Not Found

Good day mates I have this code of the contrlador and the view in asp.net mvc but when clicking on edit I get this error and verify to have created the view, I think it does not identify by id but in my code in the controller what I put it to go...
asked by 28.06.2017 / 00:16
1
answer

ASP MVC Multiple Form

I have a model called Pregunta which contains a list of another model called Alternativa . I need that when creating a question, the user can select how many alternatives to add to that question and display a dynamic form according...
asked by 04.06.2017 / 15:58
2
answers

asp net mvc5: Secondary actions are not allowed to execute redirect actions

I'm developing with mvc5 and EF I have a controller with the operations to edit a record something like this public ActionResult Edit(int id, string weblogin, byte tienda) { if (id <= 0) { return n...
asked by 16.05.2017 / 20:56
2
answers

Download a file with angularJS and c #

I have a question. I need to know how to download a file with angularJS and C # MVC . I already managed to save the file in a separate route, but when downloading I do not know how to recover it. I understand that it is by method GET...
asked by 04.04.2018 / 22:45
2
answers

Error sending data by AJAX to Method in ASP.NET

Hello friends, I'm working with ASP.NET / C # and I'm trying to pass a parameter through AJAX ... but I get this error, I recently published a very similar question, where I did the same but from a ActionLink but as I am now passing the...
asked by 21.12.2017 / 17:04
1
answer

Pass List from View to a Controller

I have a view where data is displayed in which data can be entered (Notes) @model IList<Proyecto01.Models.Nota> @{ ViewBag.Title = "Notas"; } <h2 class="text-center"> Notas</h2> @using (Html.BeginForm("ActualizarNotas",...
asked by 15.04.2017 / 08:16
1
answer

The resource is not found in c #

I have the following program that shows JSON data. Code of Controller : using MVCCuartoDia2.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MVCCuartoDia2.Co...
asked by 04.05.2017 / 05:02
2
answers

Access ViewData in a Razor view

I'm making a list of students to show it in a Razor view using ViewData. controller using ViewData.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace ViewBag.Control...
asked by 05.05.2017 / 00:52
1
answer

Create a new element in an array in c #

I would like you to help me how I could generate a new object in the Product list, it's a simple CRUD using ProductsApp.Models; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using S...
asked by 25.02.2017 / 10:29
1
answer

How do I show data in RAZOR MVC ASP.NET from SQL?

I have a SQL statement: var motivo = conexion.Query("SELECT * FROM historialvisitas WHERE idvisita ='"+rgtro+"' "); This table has several columns, how do I show via RAZOR @ the value of a specific column? Example: I want to sh...
asked by 14.03.2017 / 21:25