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

1
answer

Store file in SQl Server 2008 database AJAX C # ASP.NET

I am developing this part of a page where I need to save a file (.xls, .docx, .png, etc) on a SQl Server basis, too I need to get the properties of this file as its name, type, size; I think I almost have it, but I still get this error from...
asked by 01.11.2017 / 19:17
1
answer

Get the file of an input type file

Hi, I want to get the file from an input file. I do not want his name, nor his properties if not the file as such, and then upload it to a repository on my server. But I think I'm doing something wrong with my Js . I would be infinitely grate...
asked by 24.10.2017 / 17:27
1
answer

How to fill a table in asp.net mvc4 with ajax?

I'm doing a query to an api with asp.net, the query is well done and everything but I have a problem filling a table with ajax, I could not see the data you send me here the code c # public async Task<List<Sto_TraerCaracterizacionResp...
asked by 02.10.2017 / 17:49
1
answer

How to keep the selected value in a select after the post back

Hi how can I pantener the selected value of a select after the postback?  this is the code that I have in sight: <select id="LocalidadId" name="LocalidadId" class="btn btn-secondary btn-block" asp-items="ViewBag.LocalidadId"> <opt...
asked by 23.09.2017 / 23:03
1
answer

redirect to an error page

I have the following code make the connection and query the bd sql server: public DataTable ejecutarComandoConsultar(SqlCommand varComand) { SqlDataAdapter adapatador = new SqlDataAdapter(); DataTable tabla = new DataTable(...
asked by 13.09.2017 / 23:12
3
answers

Return ListT by Json to JS from c # with class that contains another class

I have a class Localidad that contains an attribute of the class Provincia , wanting to make the combos nested by Ajax with Jquery gives me a:    error 500 - Internal server error -. If I take out the Provincia attribu...
asked by 11.09.2017 / 23:30
1
answer

Jquery DataTable distorts table when reloading data

Here is the HTML table <table id="Tickets_Abiertos_table" class="table table-bordered table-hover table-striped"> <thead> <tr>...
asked by 04.08.2017 / 16:30
2
answers

Using DropDownList to display data from a database

I have a form made with MVC and Entity Framework. What I want to do is that using a DropDownList that brings the descriptions of the ratings. The data is obtained from a database, can you give me a hand? In the controller on line lP...
asked by 19.06.2017 / 00:12
1
answer

The content of DropDownList with Entity framework can not be saved in a bd

I am using the Entity framework for data persistence, I want to save an id (the field is of type identity), a name and the gender of the person, but when I click on save, it throws an exception to me Error de servidor en la aplicación '/'. Val...
asked by 09.06.2017 / 05:50
1
answer

How to get the current user name to send it to a PermitAttribute as Parameter

I have a PermisoAttribute class that is inherited from an ActionFilterAttribute, which I show below. public class PermisoAttribute : ActionFilterAttribute { public string username { get; set; } public int Progra...
asked by 28.03.2017 / 23:31