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

1
answer

Call data from related columns from the controller

Good morning classmates, I have related the table students and the teacher table in SQL SERVER 2014 I am now passing to ASP.NET MVC the database with Entity Framework . I have already generated the controllers and the views a...
asked by 08.08.2017 / 15:12
2
answers

MVC Relate table to table aspnetusers

They assigned me a project where I must create a sales system, but I want to use the Identity login and relate it to the sales table but I can not find the correct method     
asked by 24.07.2017 / 00:37
1
answer

HtmlHelper for a FILE type input

I have a little doubt, I need to generate an input of type File to save images in my BD, I'm using razor views in asp.net mvc 5, but I can not find how to do it by HtmlHelper , but I see that gives you none for this type of input, any idea...
asked by 14.07.2017 / 22:44
1
answer

Change primary Key in ASP.NET MVC5

Good morning, I read several posts and several pages that say that this is not recommended, in fact throws an error by bringing a record, change the password and save. I leave the code: List<Model> registroAUpdatear = (from s in db.Mode...
asked by 14.07.2017 / 21:31
1
answer

Values by default MVC with entity framework and stored procedures

I have a stored procedure for saving records that has default values. Guardar(@ID int, @autor varchar (20)='anonimo',@isbn int,@titulo varchar(25)='TBD', @descripcion varchar(250)='N/A') public virtual int Guardar(ObjectParameter ID, strin...
asked by 13.07.2017 / 16:26
1
answer

Error recognizing data model field with ADO.NET and ASP.NET

I am using Web APIS but only in the Controller. In my view I can not access the model, it tells me that a use is missing or something like that. What I want is to generate a type type input to capture the value and filter by customer name....
asked by 05.07.2017 / 03:01
1
answer

How to send a procedure stored in the controller in ASP.NET MVC and Entity framework

I have this code in my controller and my stored procedures are already mapped. I access the database through Entity framework and the edmx is defined. I would like to know what the code is like to send (use) my stored procedure to...
asked by 22.06.2017 / 18:32
2
answers

Page consultation with Linq

I have the following driver: I need at the end to send you the invoices but paginated but to 20 ... public ActionResult Index() { //se trae la informacion de la base de datos y/o modelo var factur...
asked by 18.06.2017 / 03:06
1
answer

Problems with ajax.beginform and client side validation

I want to do validations on the client side but I run into the following problem. If the model is not valid, I will return the view with the error messages in UpdateTargetId of the form, so that: The part of the code of the form...
asked by 17.06.2017 / 18:50
1
answer

How to update the packages in project asp.net mvc5 by default

How to update the packages and libraries that use visual study by default in MVC5 projects I know that if I go to the administrator of nuget packet manager and I update everything, it does it but only to the project that I have open, what I am l...
asked by 16.06.2017 / 20:53