Questions tagged as 'asp.net-mvc'

1
answer

Obtain controller object in the view

as I do to obtain and manipulate an object that returned with the view from the controller. this is the code public ActionResult CargarDiesel(int id) { var equipo = (from eq in db.equipos join cd in db.cargasD...
asked by 21.08.2017 / 19:43
0
answers

Implement login using SQL Server credentials in ASP.NET - MVC

Good morning, I am working on an application with ASP.NET - MVC and SQL Server. I do not have much experience with these technologies, so my question may be a product of my lack of instruction. Can a login be implemented in the applicatio...
asked by 03.07.2017 / 18:54
1
answer

Dropdownlist with two columns of data?

Good morning, I am working on ASP.NET MVC and I have the task of creating a dropdownlist that shows two columns with data from the same table. For example: I have looked for possible solutions and achieved the following implementat...
asked by 18.07.2017 / 17:01
1
answer

Referencing Partial View and showing its data when loading in the parent view

Hi, create a partial view through a one-action method of a controller. When referencing the partial view from a parent view with the following code @Html.Partial("~/Views/SubAutomovil/Create.cshtml") The partial view is loaded in the parent...
asked by 03.07.2017 / 08:13
0
answers

Log in with Facebook with OAuth in asp mvc

I have configured the login to a ASP MVC web application with facebook , twitter , G + and Microsoft , but facebook stopped working. I read that facebook changed some things, they know if there is a way to solve the problem and if I c...
asked by 27.06.2017 / 18:51
1
answer

How to handle DB exceptions in EF

I have this code that tries to save the model in the database and makes two catch one for the validations of EF and the other generic. It does not give me any error of the first catch but in the second it gives me an error of a foreign key I thi...
asked by 25.05.2017 / 12:25
3
answers

Unable to access a private variable from a view

Hi, I have to make a class employee scheduler that inherits from the base class employed and then I have to calculate the salary. HomeController.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using S...
asked by 02.05.2017 / 20:00
1
answer

mvc Views with Entity Framework [closed]

I am starting a new MVC project with Entity Framwork and I need to save information in 3 different tables, for this I have created a stored procedure. What I want to do is create a form from that procedure. What can I do to create the form? C...
asked by 03.05.2017 / 18:57
1
answer

Web API in ASP.NET with OData - Problem in the view

I have a Web API in ASP.NET with OData and I can consume without problems of the service, but I can not get the view to print A table. I'm starting with .NET and with MVC . Model: namespace exchange_rates { using System; us...
asked by 20.03.2017 / 12:34
3
answers

Align horizontally on opposite sides buttons with bootstrap

I have a form in which you can perform three actions: Enter employee, cancel and Save. I use bootstrap to create the form and the buttons as I show in the image The problem is that I would like the three buttons aligned horizontally...
asked by 31.03.2017 / 19:22