Questions tagged as 'razor'

2
answers

Create form for Model List

I have a Model called Question: public class Pregunta { public int id { get; set; } public string descripcion { get; set; } public int peso_id { get; set; } public List<int> roles_id { get; set; } public int dimension...
asked by 07.06.2017 / 17:04
2
answers

Go to another controller from javascript

I want to redirect from a view to a controller that is a higher level, for that I use @url.action in this way miUrl = '@Url.Action("CambiarEstadoVisita", "~/Areas/Visitas/Visita")'; But the link it generates is this: http://localho...
asked by 24.08.2016 / 10:23
1
answer

Invalid visual variable for the max-width property of a style. In MVC asp.net

I have the following code: <% For Each img In Model.listadoNoticias.Item(0).FOTO Dim id_LaImagen = "foto_" & img.IdFoto.ToString() Dim src_imagen = img.RutaFoto.Split("/") Dim ruta_Foto = Server.MapPath("~") & s...
asked by 10.03.2016 / 05:47
1
answer

C # How to convert string to System.IO.StreamWriter?

Hi, I have the following problem, I want to write my csv but I put the accents wrong with strange characters. Then I want to add UTF8 but when I put it on, more Encoding.UTF8 already tells me that    Unable to convert string to System.IO.Stre...
asked by 10.08.2018 / 17:39
1
answer

Create variables in Razor and then manipulate them in Jquery?

Is it possible to do something like this? @{var list = [1,2,3,4,5]; } I do not boot error but then when I want to use that variable in Jquery, it does not appear. What is the correct way to do it?     
asked by 14.12.2017 / 22:35
1
answer

How to prevent "being encoded as" in Razor?

Well the question here is that I'm working on a razor file and I'm wanting to create a json from an array in vb.net as follows: For Each ItineraryPnr In ItinerariesNode.ChildNodes arrayPnrRetrieve(contPnr) = New With {Key .trasactio...
asked by 14.03.2016 / 19:13
2
answers

How to get the value of an attribute in an html tag with JQuery

Friends What happens is that I need to capture the value of an attribute of an html tag in this case. <input class="btn btn-danger link1" type="button" value="Delete" data="@item.MunicipalityId" /> I have this tag inside a cyc...
asked by 13.06.2016 / 22:06
2
answers

colspan does not work on the Datatable in C #

For example, I have a datatable: <script type="text/javascript" class="init"> $(document).ready(function () { $('#table_1').DataTable( ); }); </script> <table id="table_1" class="table table-striped table-bordered" > &...
asked by 26.09.2016 / 05:31
5
answers

Problems showing parameters in partial view

I am consuming a service to consult customer balances, it returns me as an answer an entity with these properties: public string errorCodigoField { get; set; } public string errorMensajeField { get; set; } public decimal saldoRecargasField { g...
asked by 16.08.2017 / 17:33
0
answers

help with autocomplete in dynamically created elements

I appeal to you because I have not been able to implement the autocomplete in dynamically created elements with jquery, I do it in the following way. $('#addMarcaTabla').click(function () { var html = ''; html += '<tr class="...
asked by 30.01.2018 / 21:23