Questions tagged as 'asp.net-mvc'

1
answer

Angular Js + MVC .NEt

I'm starting with the issue of Single Page Applications with MVC from .Net, and it has become difficult to solve the dependencies, I've taken the example of the page link and everything is fine, until I use ui.bootstrap components, the point i...
asked by 18.10.2016 / 01:06
3
answers

Difference between Public Virtual and List

Hello people I would like to understand what is the difference between declaring a model relationship (entity framework) by public List<Modelo> Modelos { get; set; } and public Virtual Modelo Modelos { get; set; } . Thanks aga...
asked by 11.10.2016 / 19:53
1
answer

as I think dropDownList with Entity Framework in Asp.net MVC

I'm starting a new project and I'm migrating from webForm to MVC and I confess that I miss the best basic questions for some. Well one of those questions is the following, I need to create a dropDownList and the data of this both the ID and...
asked by 26.10.2016 / 17:45
2
answers

How to send a value of an input that is assigned by jquery to the controller using Url.Action in MVC C #

I assign a value to input by jquery in document ready $(document).ready(function () { $("#input_1").val(“valor de prueba”); }); In the body, there is the input and attempt to send its value by url.acti...
asked by 15.09.2016 / 23:27
1
answer

Call an ActionResult from Jquery

From Jquery I want to call an ActionResult from a controller, but it does not arrive. That ActionResult does not belong to any view, I just want to change a data in BBDD. How could I get it? The error that the javascript console leaves:   ...
asked by 08.09.2016 / 12:11
1
answer

When using (String.Format ("{0: # - # - ##}", item.codigo)) on an item in a list, the order by value_id is lost MVC C #

I have the following view that is responsible for showing the code in this format 9-9-99. And from the controller I indicate that it is ordered by the code, which is stored in full: <table id="listado_table " class="table table-striped tabl...
asked by 27.08.2016 / 17:45
1
answer

Call signalr hub from a modal window

I'm trying from a modal window to call the hub but it does not reach the hub, without giving any error Here the code: -Function hub: public void Estado(int estado, int id) { RepositorioVisitas.AutorizarCancelarVisita(id,estado);...
asked by 08.08.2016 / 16:51
1
answer

How to know without a "remove" in my driver was rejected because of a foreign key violation?

how to tell the user that a record has not been deleted because it has other entities that inherit its primary key by means of try / catch? try { db.usuarios.Remove(usuario); } catch(?????) { ??????? }     
asked by 17.08.2016 / 23:13
1
answer

string format in an input that receives value from ajax

I have a textbox, which receives a data by AJAX. @Html.TextBox("CantidadPago", string.Format("{0:C}",0), new{@class = "form-control"}) AJAX $.ajax({ type: 'POST', url: '@Url.Action("CalcularCantidadPag...
asked by 06.10.2016 / 23:18
2
answers

Html Table, Get text from one cell by clicking on another

I develop an Asp Mvc web application, in one of the views I have a table with the following structure: <table id="grupoActividades" class="ctrlTable table table-striped table-bordered table-hover" cellspacing="0"> <thead class...
asked by 30.05.2016 / 17:28