Questions tagged as 'razor'

1
answer

I want my database to delete data after 30 days of being saved SQL - RAZOR

(Use RAZOR) What I need is for my database to delete ROWS created 30 days ago, the creation date I am saving in a Datetime type field. So far I can only subtract and obtain the day address, for example: var Fecha = solicitud.fechainicio - Date...
asked by 02.10.2017 / 15:10
3
answers

Rows of DataTable Bootstrap in a single line ASP.net MVC

I want all the rows to be in one line. As you can see below, I have a view where I get a dynamic datatable that was fed by a Json, I do not know the name of the rows or columns so I can not put a fixed width to all columns <table id="exa...
asked by 08.02.2017 / 20:11
1
answer

MVC 4 mark all checkboxes

Good morning, I'm doing a project in mvc4 razor, and in a view I need to show a table. So far so good, the problem comes when I have to put a checkbox in the header and one in each element of the table and the first checkbox mar...
asked by 22.06.2016 / 09:58
2
answers

I have a property in a class, which contains a list of objects of another class, in which layer I fill the list?

Greetings, I have a class called Cv (Currículum vitae) and apart from the typical properties: Name, Surname, DNI ... it also contains a property "Driving licenses" which is a list of objects of the class "Driving licenses". Where do I have to ge...
asked by 02.02.2016 / 17:29
2
answers

ASP.NET execute method through AJAX

Hi, I'm learning to use AJAX in ASP NET, I want to run a method through js, but I'm not sure how to reference it, the method I want is in my controller but when I give it the route it does not tell me it does not find anything . @model P...
asked by 29.09.2017 / 21:41
1
answer

Errors in HTMLHelper references

Visual studio throws me these errors that are seen in the image, even when I have the code well done and also when I run the page everything is fine.     
asked by 08.11.2016 / 21:36
1
answer

How to represent this html code with razor helpers

I have the following HTML code: <div class="form-row"> <div class="form-group col-md-12"> <label class="form-label">Tipo de dirección</label> <div class="form-inline"> <label class=...
asked by 23.11.2018 / 11:32
1
answer

Problem with variable razor mvc

I have an EsperRule clas which has some properties, among them another EsperRule, my goal is to show all the data of the EsperRule and in case the other EsperRule is different from null, show the data of that and so on. I did something like t...
asked by 12.09.2017 / 15:18
1
answer

Assign values to the select

I have Brand, Blend, Flavor and Drink classes. Flavor has a Mark and a Blend. Drink consists of a Taste and other fields: public class Brand{ public int BrandId{ get; set; } public string Name{ get; set; } public ICollection<Flavor>...
asked by 05.07.2017 / 20:28
1
answer

Assign a counter as Id to an HTML tag

My question is the following, in my project of ASP.NET , I have in a view, the foreach of razor with which I print my values of the model, and a div is created for each iteration, what I need is that this div have an id au...
asked by 20.06.2017 / 20:41