Questions tagged as 'asp.net-mvc-5'

1
answer

Differences HttpRequest and httpRequestBase

From the controller the controller class gets the property Request and from System.Web.HttpContext.Current.Request but I do not understand the utility: public class HomeController : Controller { public ActionResult Index(Http...
asked by 04.11.2016 / 20:34
2
answers

Save value in ASP.NET MVC5 variable

I need to save IDs that pass through the url    link I need to capture that "1009" value and take it to a <input name="codigo" type="text"class="form-control" value="AQUI NECESITO QUE ESTE ESE VALOR DE LA URL"/> I need to sa...
asked by 28.03.2017 / 17:11
2
answers

ExecuteScalar returns ASP Null Id ASP.NET

I'm trying to create a comment system in a personal project and the following problem arose, when wanting to generate a new comment I do not recognize the Id of the comment and the ExecuteScalar returns me as null the Id, the idea...
asked by 19.12.2015 / 05:31
2
answers

MVC problems pointing addresses

Friends I have the following form that points to a method in my controller CreateFolder I have no problem running my method, however, it is not giving me the view I want ... that is, I I always wait for you to send CreateFolder / index and t...
asked by 17.05.2018 / 21:45
3
answers

Multiple models in an ASP NET MVC view [duplicated]

Hello friends I'm still stuck with this, someone can help me out ... This is my error: These are my models and my htmlCs //kyo es el nombre de mi vista, este es el controller //GET: Home/kyo [Authorize]...
asked by 14.09.2017 / 20:02
3
answers

Sort lists in C #

I need to return the list facturas ordered by the field entidades . I've tried like that but it does not work for me: facturas.OrderBy(f => f.Entidades).ToList(); Code: public ActionResult Index() { var facturas =...
asked by 01.06.2017 / 16:28
1
answer

Redirect a URL from JavaScript to a controller in MVC with Angular

I have declared the following in angular.js .when('/plan', { templateUrl: 'Main/LinkTiless', controller: 'PlanCtrl', controllerAs: 'planEstudios' I will not send it to a view as it is typically done, Content\Views\Pl...
asked by 09.12.2016 / 17:20
1
answer

Where to place the Data Annotations?

Just in case there is a problem with concepts, I define: Model: = The class that establishes the Tables of the database. ViewModel: = The class I use to send to the Views (so as not to pass the complete Model). My question is this: T...
asked by 15.11.2018 / 22:41
1
answer

How to create a drop-down list with submenu

Good day, I'm trying to create a drop-down list with submenu's inside at the time of doing and running it does not let me do it, it does not show me, I'm doing it with boostrap 3.3.7 that comes in mvc 5 of VB, it could help me how to do it...
asked by 23.10.2018 / 00:51
1
answer

Using Where in c # asp.net mvc 5

what can I do to save what that where generates every time I enter and then show it in the view, as well as saving the FirstOrDefault that every time I enter it I keep it in that add if (DedudccionesId != null) { IL...
asked by 17.10.2018 / 18:00