Questions tagged as 'razor'

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
2
answers

Data Annotations in a form do not work

I have a form to persist data with entity framework , I put DataAnnotations to my model, but still I do not validate the values, I do not see the messages of error , if I do not put nothing in the name field or in the select...
asked by 09.06.2017 / 20:20
1
answer

Get values from a DropDownList

As I can get the value of a DropDownList in the controller, it is assumed that there is a DropDownList which when selecting an option and pressing search should filter and throw the data in the table below in that same view, I am working on the...
asked by 11.11.2016 / 06:20
2
answers

Is it possible to use a value of javascripts in razor asp.net?

Suppose I have the following value of javascripts: <script type="text/javascript"> var variable_js=10; </script> and in razor, an asp.net variable, I want to assign the value of javascripts that you declare. For example: @...
asked by 15.05.2016 / 22:32
0
answers

Why do not all the variables pass through the GET method in C #?

I have the following driver to receive parameters by get I send my url as link public ActionResult UsarCode(string rmail, string rcompany, string raddress, string rpais, string rtel, string rhash, string ridpalpay, string rpriority, strin...
asked by 14.08.2018 / 18:12
2
answers

Get the value of an input button

I have dynamically created buttons, and I wish that when you click on them you get your value to be able to interact with it. @for (int i = 0; i < pagesMax; i++) { <input type="button" value=@(i+1) class="bottom" id="id" />...
asked by 25.06.2018 / 21:30
0
answers

@ Html.Captcha does not work correctly

Recently I developed a page that has html and razor, in it I have an @ html.Captcha like the following: @Imports CaptchaMvc.HtmlHelpers @Html.Captcha("Refrescar", "Por favor, escriba el texto de la imagen.", 5, "Is required field.", True) T...
asked by 18.06.2018 / 20:13
0
answers

Inventory: update stock according to the amount that the user enters in an input in razor

I'm doing an inventory system, where I have to add or remove stocks of a product. I currently have a table producto where I keep the product data (as well as the amount that I have in stock), and a table movimientoEntrada , where I...
asked by 11.04.2018 / 19:10
1
answer

Show hidden rows of a table with data-toggle="collapse" in Asp.Net Mvc

Hello good day I am using data-toggle="collapse" in Asp.Net Mvc to hide some columns of each row and that when clicking on a row those columns are displayed and it does so but I would like it to click only the data of the row that I am selecting...
asked by 24.01.2018 / 16:38
1
answer

Obtain controller object in the view

as I do to obtain and manipulate an object that returned with the view from the controller. this is the code public ActionResult CargarDiesel(int id) { var equipo = (from eq in db.equipos join cd in db.cargasD...
asked by 21.08.2017 / 19:43