Questions tagged as 'razor'

1
answer

how to change color of an Html.ActionLink

<div class="row"> @foreach(var comicBook in Model) { <div class="col-md-3"> <h4>@Html.ActionLink(comicBook.DisplayText, "Detail", new { id = comicBook.Id })</h4> <a href="@Url.Action("Detail", new {...
asked by 03.07.2018 / 17:38
3
answers

How to overwrite my bootstrap file on my stylesheet?

As you can see in the inspector the file site.css is loaded which is where I have my styles that should overwrite bootstrap, but does not load the new content I write, what is this?     
asked by 06.07.2018 / 16:31
2
answers

How can I send an Arrangement in the post using JSON?

I have a function in ajax that creates an arrangement of an object and sends it to the PageModel with a post. function guardarOrden(data) { return $.ajax({ contentType: 'application/json; charset=utf-8', dataTyp...
asked by 26.06.2018 / 22:03
0
answers

How to show a value in a select of an edit view (scafolding) from a model

<div class="form-group"> @Html.LabelFor(model => model.Cantidad, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> <select class="form-control" id="Cantidad" name="Cantidad">...
asked by 26.06.2018 / 21:04
1
answer

How do I load a driver before loading a js file?

I'm doing a small guided tutorial for a web page, I'm using a library called introjs , which helps a lot for that task. But I have a small problem, the web page is created with MVC Razor, and the menu part is dynamic, and it is loaded from t...
asked by 17.07.2018 / 00:45
1
answer

Get value of a Javascript function in a variable C # mvc5

I need to store what returns a JavaScript function inside a variable in a C # view with razor in mvc 5. For example, what this function returns: function fechafin(){ var ff = document.getElementById("ffin").value; return ff; }...
asked by 21.06.2018 / 06:02
1
answer

How can I add objects to a List in the PageModel and have the view updated without sending the POST?

I am new to Razor Pages and I want to add a product to a list that is included in the PageModel and display the list in a table, but when adding a product to the list the section of the table is updated.     
asked by 22.06.2018 / 21:42
0
answers

CheckBoxFor and ListBoxFor do not behave in the same way when making a post with them?

I have a form in which I occupy ListBoxFor and CheckBoxFor for them I have their respective classes which are the following. public class SelectViewModel { public List<SelectListItem> MiPropiedad { get; set; } publi...
asked by 05.06.2018 / 22:41
1
answer

Are there more ways to call a partial view from the view?

Is there a way to call from the view to Partial View as a Url.Action or otherwise? Since I have a method in my controller that renders a partial view, but I need to call that method from my view, for example @Html.Partial("Contr...
asked by 28.05.2018 / 22:05
0
answers

Send model to PartialView with $ .load

I'm here because I have a small problem with handling a Model between View and% PartialView The question is the following, I have a view (that fulfills the form), so as not to overload it so aggressively, add a PartialView...
asked by 24.05.2018 / 14:24