Questions tagged as 'razor'

2
answers

Pass values in razor to javaScript

I'm doing an application in asp.net, what happens is that I need to access a value that the razor brings me, to later use it in a script but I do not know how to combine razor in javascript, I know that from javascript to razor not it is possibl...
asked by 16.06.2017 / 18:51
2
answers

How to pass a DropDownList Value from a view to a controller using ViewModel?

I'm learning about ASP.NET Core and I've been a few days stuck in the following hopefully I could help. In my controller I have the following ' public IActionResult Index(string searchString) { ViewData["FiltroActual"] = searchString...
asked by 26.04.2017 / 07:51
2
answers

How to get the values of the view to the MVC controller - RAZOR

I currently have this code in a view, and I want to get all the values to pass them to the controller and create them in the database I have 2 models Subjects: namespace CalculaNotas.Models public class Materias { public int materiasId...
asked by 17.03.2017 / 04:43
2
answers

in the text field of the email I get [email protected]. How to remove it?

It turns out that I have a datatable that lists personal data of people, and one of them is the mail, when I test it locally, it looks good mail, but from the production site it shows me the email with the word [email protected] the result of th...
asked by 03.01.2017 / 22:37
1
answer

problem with my javascript function in MVC3 view

hello community stack I need help with my javascript function does not do the multiplication of text fields. //funcion para multiplicar dos campos de texto <script type="text/javascript"> function multiplicar() { m1...
asked by 04.11.2016 / 20:19
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

implementation of sweet alert in an @ html.ActionLink

I need my @Html.ActionLink(); to execute a onclick() and then I run the driver that I send as overload this is what I have. @Html.ActionLink("Delete", "DeleteMunicipality", new { id = item.MunicipalityId }, new { @class = "btn bt...
asked by 10.06.2016 / 19:15
1
answer

How can I get it, the time from Razor ASP.NET

On this occasion I have a question which is, how can I get the time or the time from Razor or a way to get them separately, I attach my entity Cls and the View, thank you and excuse the inconvenience. using System; using System.Collection...
asked by 26.12.2018 / 19:12
1
answer

Can you use the Visual Studio toolbox controls, such as GridView, UpdatePanel, AjaxControl Toolkit, etc. working with MVC and Razor?

I am working with visual studio 2013 with MVC and razor , but I would like to take advantage of using the visual studio controls, such as gridview , treeview , navigator , etc. I remember that when I work...
asked by 30.01.2016 / 04:08
1
answer

When doing POST I do not correctly recover the value of a radio button

I try to describe my scenario. I have a view that contains two radio buttons and depending on which one is selected, a partial or another view is displayed. @Html.RadioButtonFor(model => model.TipoVP, new String("VP_A".ToCharArray()), new...
asked by 20.12.2018 / 15:21