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

2
answers

Conditional error in foreach using ASP.Net MVC

Partners of Stack Overflow in Spanish, I have the following error when doing this conditional ViewBag.p.Where(n => n.Lider == namelider in cycle foreach . Here I show you part of my code: <table class="table table-bordere...
asked by 11.07.2017 / 23:42
2
answers

Can I cancel the sumbit of a form and prevent it from reaching the controller (server)?

I would be interested to know if I can cancel or prevent the button submit from reaching the controller. As before the jquery .click event is executed, you may be able to do something about it and thus prevent it from continuing its execution. T...
asked by 06.04.2016 / 16:38
2
answers

Export data to Excel from MVC5 view

I need to know how I can export the next table I have in a project view to an excel document. The table I want to export to excel is as follows: <table class="exampletb table table-bordered table-hover display"> <thead&...
asked by 15.07.2017 / 05:41
1
answer

Format for currency (MXN) DataFormatString

I am applying in the model the DataformatString I wish that in the price of the products appear the cost separated by thousands with one (,) and that it appears without decimals. I was able to make decimals not appear but not to show the thousan...
asked by 20.08.2018 / 15:56
2
answers

fill in input from dropdownlist selection ASP.NET MVC5

Hello StackOverFlow colleagues, I have the following question, how can I load or give a value to an input when selecting an option in a select or dropdownlist? my create controller is as follows: // GET: Collaborators/Create publ...
asked by 17.05.2017 / 15:24
2
answers

Area routing problem using MVC .Net

I am working on a project that has a presentation layer with several Areas, and it is difficult for me to test the application, since the controllers and views that I am developing, are in a defined area. I was looking for information about w...
asked by 19.01.2017 / 16:57
1
answer

Difference between Html.BeginForm () and Html.BeginRouteForm ()

Basically that's my doubt, what difference there is between these two html helpers . and when you should use one or the other.     
asked by 08.04.2016 / 19:34
1
answer

ActionLink in the form of Routing by parameters instead of QueryString

I'm trying to make it use a ActionLink with multiple parameters to generate a link to me in the form {Controller}/{Action}/{idCompania}/{idLocal}/{fecha} But it always generates a querystring : {Controller}/{Action}?idCompania=0&a...
asked by 23.12.2015 / 16:36
2
answers

Call an attribute from one class to another to make a ValidationResult

I am looking for ways to validate my model with entity framework , and with validationResult I can achieve it, but with only one class, what do you propose to call another class and validate? an attribute of that kind? Example: public IE...
asked by 22.11.2016 / 17:52
1
answer

Return a list of an object

I have the following model with a method to retrieve a list of data of the same model. public class Totem { public int Id { get; set; } public string Dato1{ get; set; } public string Dato2 { get; set; } public string Dato3 { ge...
asked by 28.08.2018 / 21:25