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

1
answer

How can I show all deductions for a single employee?

This is my current view that shows me the deductions of the employees what I need is to show all the deductions of an employee If you can see here, it shows all of them, what I want is for you to show me all of the 2390 employee,...
asked by 16.10.2018 / 18:27
2
answers

How to make a conditional if depending on which model type my variable contains?

I have the following code below: var response = await ... the response of the await can be of two types, for example of type Model1 or of type Model2 depending on which type model is the answer I need to do certain things, it...
asked by 06.06.2018 / 21:13
1
answer

How to go through all the bootstrap-table of my page

Hello, I currently have an mvc .net application where in a view I have several tables and the objective is to obtain all the data of all the tables, this is my html code for one of the tables: <div name="7488" id="7488" control-type="TIssFo...
asked by 22.05.2018 / 17:53
2
answers

problems with ModelState.IsValid does not respect the required

I am doing validations to the text fields of a form through a model that I decorate with [Required] to require certain fields but cn the controller when I do the condition if (ModelState.IsValid) does not do the saving in the BD since the model...
asked by 13.04.2018 / 00:33
1
answer

Cut in several parts string of characters C # asp.net

Good evening. How can I convert the following string: "image / jpg, image / jpeg, application / pdf" in the following: ".jpg, .pdf, .zip" Also taking into account that the first chain can include more extensions. Thank you.     
asked by 08.11.2017 / 02:51
2
answers

Add value of a Foreach in MVC5 controller

I need to add the weighted the times the cycle is run and show it in builder.Append(total suma ponderados).Append(";"); , my code is as follows: foreach (var item_ponderado in listobjetivos) { var ponderado = (item_ponderado.p.Peso_O...
asked by 17.07.2017 / 20:47
1
answer

Delete User from Table AspNetUsers MVC5

As I can delete users that I created in the AspNetUsers table, I work under MVC5. My code is as follows, AccountController.cs: //INDEX LIST USERS ADM public ActionResult Index() { userContext = new Applicatio...
asked by 08.05.2017 / 21:48
4
answers

Problem DataAnnotation DataType for Date

I have a problem with the DataAnnotation DataType Date, in my view the date is displayed perfectly as I put it in the DataFormatString, but the moment I edit it, it appears as if I had not specified a date before or was not stored in the databas...
asked by 03.04.2017 / 21:57
1
answer

Problem with DataAnnotation (DataFormatString)

I have a problem, in the visualization I am shown the data with the Euro symbol    € 123.00 and I need it to be displayed with the weights sign $    $ 123.00 My code is as follows [Display(Name = "Salario Cargo")] [DisplayFormat(...
asked by 03.04.2017 / 20:42
3
answers

Do not load the scripts from the BundleConfig.cs

I am starting a project in ASP .NET MVC 5 in Visual Studio 2017, I have created my BundleConfig.cs file with the following information: using System.Web; using System.Web.Optimization; namespace Login { public class BundleConfig {...
asked by 19.04.2017 / 20:10