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

1
answer

How to sort a table for a second field in case the 1st field is repeated? in MVC of Asp.Net and VisualStudio2017

I am using Visual Studio 2017 with ASP.Net and MVC . Where I am sorting the fields of a table by a field Call number . public ActionResult Index(){ var hojaArchivo = db.HojaArchivo.Include(h => h.HojaInicial).Include(h => h.Mat...
asked by 04.07.2018 / 18:23
1
answer

How can I return something in the constructor to use it in my class?

I have an action filter to make a log in a class called LogActionFilter which has its respective methods to perform each specific task, and from my control I call this filter as follows [LogActionFilter] up there all right . The...
asked by 03.07.2018 / 18:15
0
answers

Why do I generate a .Debug .Release file when I deploy from VS?

I have a project in visual studio which I have a file of type config example mifile but when I publish it from the platform (vs) it generates two more files apart from the original, which are mifile.Debug and mifile.Relea...
asked by 03.07.2018 / 16:45
2
answers

Check Record in BD (ASP.NET MVC 5)

I would like you to help me to create a method that validates if there is already a record in BD with the name of the user that is authenticated and that this one returns a Boolean and sends it to the view to be used with JavaScript. Th...
asked by 04.07.2018 / 15:54
0
answers

How to validate the value of a parameter in the routes?

I am programming in asp mvc with c # and I have an action declared as follows: public FileResult ViewImage(int ImageFileItemId, int MaxWidth, int MaxHeight, bool FixedWidthHeight, string JpegQuality) . I would like to validate that t...
asked by 02.07.2018 / 17:49
1
answer

Export pdf file using ajax in MVC C #

I would like to know how to export an excel file using ajax, I have tried in the following way, but it does not work: $("#ajax_loader").css("display", ""); var formato = "PDF"; //window.location.href = url; //$("#ajax_...
asked by 03.07.2018 / 01:09
1
answer

Generate alphanumeric numbers in MVC5

I have an application in mvc 5 asp.net and I would like to generate an alphanumeric number automatically example of result I want: B0100002062 and that will increase as I insert records, I would appreciate the contribution     
asked by 29.06.2018 / 17:55
0
answers

Problem deserializar JSON with NewtonSoft.JSON ASP.NET MVC 5

I have followed the advice of several questions here in stackoverflow in Spanish and the same in English, I have already lost two days with this and I have not found the problem, I have the following JSON that is valid: [ { "Info": {...
asked by 26.06.2018 / 20:01
1
answer

Error System.Web.HttpException when doing a Response.Redirect

I have an action filter that validates me if there is a data or this is true or false to then redirect to an external url. Redirection works well. But I have the filter in my controller globally and when I enter the controller...
asked by 26.06.2018 / 15:41
0
answers

Default value in MVC5

I need to create a sequence that is inserted by default, that is, I need that when inserting a record it is inserted by default, example fn000001,fn000002, ect. help     
asked by 02.07.2018 / 15:03