Questions tagged as 'razor'

3
answers

Razor - Send parameters to a modal Bootstrap

I have a list (grid) and want to open a modal bootstrap with details of the chosen line. To build the list I'm using - @foreach , and I store the data in viewbag . The idea is to open the modal window and use the data of viewba...
asked by 30.09.2015 / 07:15
1
answer

retrieve data from a view table in controller

I have a table that is dynamically generated in View . From the moment the user selects the products in another table, I need to retrieve in the controller all ids and product quantities that are in this table. Here is the jQuery function tha...
asked by 08.09.2015 / 20:17
1
answer

Url.Action with routevalues and objects

I have the following Url.Action : @Url.Action("ActionName", "ControllerName", new { area = "AreaName" }) I also need to send some objects to this action through this Url.Action , how could I do this?     
asked by 02.09.2015 / 13:22
1
answer

Display the return of a query with 2 tables in the same View in ASP.NET MVC

Controller: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using HelloMobile.Models; namespace HelloMobile.Controllers { public class HomeController : Controller { //...
asked by 14.07.2015 / 22:22
1
answer

How to call controller action?

I have the following code: function confirmaExclusao() { var decisao = confirm("Deseja excluir permanentemente esse item?"); if(decisao == true) { //Chamar a action para excluir } else { //Aqui não vai f...
asked by 04.06.2015 / 18:52
1
answer

Retrieve property of an Anonymous Object C # Razor

I'm working with MVC4 and RestSharp for data access via API Rest, My return is an object of type Object but I can not retrieve a specific property of this object. How can I access the property? Here is the code for the view where...
asked by 23.04.2015 / 15:17
1
answer

Radio button using ViewData for an MVC model

I have a ViewData and would like to make it a RadioButton for a model ViewData["tiposPagamento"] = dbo.TiposPagamento.Where(_=>_.Ativo); Radio Button: @Html.RadioButton(m=>m.TipoPagamentiID, ViewData["tiposPagamento"]) But just...
asked by 16.04.2015 / 12:43
1
answer

Hierarchical Object Filter

I have an asp.net MVC 4.5 C # razor screen typed by a main class: public class ClassePaiDTO { public virtual ICollection<Filho1DTO> Filho1s { get; set; } public virtual ICollection<Filho2DTO> Filho2s { get; set; } //c...
asked by 17.03.2015 / 13:57
1
answer

Update modal content dynamically

I have a table with up to 10 listed services, and each row has an update button. When you click the refresh button, a modal window opens with the data in this row, as well as a form for change. However, I can not get the controller to return...
asked by 20.09.2014 / 02:07
1
answer

How to add a value sent from an onclick to the Ajax 'date'?

I have a table in HTML and in a table column there is a link that opens a Modal. In this way I make approval records and show who approved and the date of approval (more than one person can approve, so he has a list of approvals). To do t...
asked by 20.03.2014 / 15:24