Questions tagged as 'asp.net-mvc'

1
answer

Call document.ready from a partial view

I am working with ASP.NET MVC, JQuery I want to call a document.ready from an ajax that is in a partial view, I show code: PARTIAL VIEW <script type="text/javascript" language="javascript"> $('form').submit(function (e) {...
asked by 21.03.2017 / 03:42
1
answer

Do a modal window correctly?

I'm learning MVC in aspx, chtml y c# , and I got to the part that shows the details of a student but first I did that I copied the same structure of my Layout and now what I want is to show a modal window of Ver Detalle...
asked by 13.12.2018 / 23:55
1
answer

Using Where in c # asp.net mvc 5

what can I do to save what that where generates every time I enter and then show it in the view, as well as saving the FirstOrDefault that every time I enter it I keep it in that add if (DedudccionesId != null) { IL...
asked by 17.10.2018 / 16:00
1
answer

Help with MVC (pass html data to a controller) [closed]

Good evening everyone I need help with something I have in a view something like this <h5>Cuanto es 16/8</h5> <div class="radio-btns"> <div class="swit"> <div...
asked by 17.09.2018 / 00:13
2
answers

Problem datetime value null

It turns out that when I run my view, I get this error Now, my controller is this: public ActionResult contact(string txtNombreArchivo, string txtCantidadTarjetas, string txtNombreAfiliado, string txtBIN, DateTime dtpFechaVigenci...
asked by 03.12.2018 / 23:11
1
answer

how to identify that the attribute of an object is a class type? C # [closed]

I'm doing a method in c # where I traverse an object taking out its attributes, its properties and see the value of the properties, but some of these attributes are classes that in turn contain more properties, I must access them, to I am doing...
asked by 21.09.2018 / 14:26
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 / 19:13
1
answer

Extract data from a db mediate angularjs and ajax

I am trying to extract the data from a table in my db using ajax and angular. Do a CRUD with MVC using asp.net and entity framework, the CRUD does not have any problem, but when displaying a data saved with angular no does not return anything I...
asked by 21.04.2018 / 20:10
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 12.04.2018 / 22:33
1
answer

Send view parameters to the controller With angularjs

DropDownList was created by the framework @Html.DropDownList("IdPais", null, "Seleccione un país", htmlAttributes: new { @class = "form-control", id = "SelectPais", onchange = "SelPais()" }) This form sends me the id that I need to the c...
asked by 29.01.2018 / 14:00