Questions tagged as 'asp.net-mvc'

2
answers

From ViewBag to JSON

I am passing a controller ViewBag to the view and would like to pass it to a numeric array in JavaScript. The content of the ViewBag:    "12,13,17,18,19,8,9,14" My last attempt has been this: var horas = @Html.Raw(Json.Encode(ViewBag...
asked by 20.10.2016 / 10:52
1
answer

How to send error or info messages to the view with ModelState?

I have the following form with Ajax.BeginForm using (Ajax.BeginForm("MiAccion", "MiController", new { ReturnUrl = ViewBag.ReturnUrl }, new AjaxOptions { OnSuccess = "OnSuccess", OnFailure = "OnFailure" })) {...
asked by 21.06.2018 / 19:31
2
answers

Get the elements of a Grid.View with active filters

I'm a rookie and just a little more than the basics. I have a Grid.View that shows me the records of a BBDD. I have a "document browser" that shows me one by one all the documents of the database and allows me to navigate among them. What...
asked by 03.03.2017 / 16:45
1
answer

Does not load the frontend when accessed from outside the server

I have a .NET web application developed with C # MVC4. It is hosted on an IIS running on Windows Server 2012, and running, as long as it is accessed from the server as follows:    link But when I access from outside the server    li...
asked by 08.09.2016 / 19:54
2
answers

close Bootstrap modal popup

I'm trying to close a modal bootstrap window with a url returned from the ActionResult, but for some reason it's not working: This is my script: $('form').submit(function () { var $form = $(this); $.ajax({ url: this.acti...
asked by 15.05.2016 / 00:50
2
answers

Showing the data that brings the stored procedure to an ASP.NET MVC 5 view

I'm trying to show what my stored procedure brings and I want to send it to view: This is how I sent it: var Fechainicio = new SqlParameter { ParameterName = "inicio" , Value = FechaDesde };...
asked by 24.10.2018 / 15:47
3
answers

Pass data between views (Without Entity Framework)

I have a form that in a field has a button, that button opens another view where I have a list of X number of elements. What I want to do is that when I open that second view I select an item from the list and that selection is passed to the tex...
asked by 15.11.2016 / 16:56
1
answer

I can not convert a String to a Boolean

I am with a form, in C # with the MVC structure, and I can not convert the string to bool , it is assumed that the code to write must be done from the controller and in the html <form> <div class="editor-label">...
asked by 02.10.2018 / 21:00
2
answers

Show Reports Teleriks in project asp mvc gives error

Good afternoon, I have a project in asp mvc 5, with razor views, which I am trying to show some reports of teleriks that I already have facts, and they are in the Content folder, however, I am giving many problems and errors . Like this: Par...
asked by 10.04.2016 / 03:07
2
answers

How can I give a margin to the text of the checkbox?

I have the following code: var fieldSet = "<div class='checkbox'><label><input " + propRequired + " data-is-common-control-note='" + IsCommonControlNote + "' data-is-required='" + IsRequired + "' class='input-details' type='ch...
asked by 18.04.2018 / 17:28