Questions tagged as 'razor'

2
answers

Back to previous page - mvc page razor

I'm trying to get back to the previous page, like this: string urlAnterior = Request.Headers["Referer"].ToString(); if (urlAnterior.Contains("Pagina")) return RedirectToAction(""); else return RedirectT...
asked by 03.07.2018 / 16:56
1
answer

How to use the C # syntax in 'onclick'

I declared a variable in view : @{ int index = 0; } And I want to change it through onclick : @for (var b = 0; b < cont; b++) { <li> <a onclick="@(Index = b)">End...
asked by 09.01.2018 / 12:44
1
answer

Pass properties from the ViewModel to the Controller

I put my table inside a BeginForm passing my controller and my action, but when I submit submit the fields are NULL in the controller, I think it is not passing the ViewModel properties. @model Dlieve.BackOffice.Areas.BackOffice.Models....
asked by 07.02.2017 / 17:04
2
answers

How to call an Html.Action ("my_page") via jquery?

I have a page that loads several partials views, I want to call a specific page in a modal that will fill the entire screen. I'm using a generic jquery command to call an action that will be passed by parameters. This is the <button type...
asked by 07.03.2016 / 21:38
1
answer

checkbox + Model + Controller. How to pick the selected lines?

I'm sent my model to a view and loaded the data into a table where I include a checkbox for each line. The user will select the items of interest to be later recorded in the database. My question is right on this point. How do I send th...
asked by 01.10.2015 / 00:04
1
answer

JQuery - Tie inside a DIV

Hello, good morning. Simple: I'm giving a For a div: <div class="Laço"> <div class="ItemLaco"></div> <div class="ItemLaco"></div> <div class="ItemLaco"></div> </div> Now I need...
asked by 22.06.2015 / 07:34
2
answers

Save data group in Post method

I'm using the BeginCollectionItem to save a list of data in my add method. For this, I created a ViewModel with the main data to the list that I want to save, in the POST method I have ViewModel TypePresitionVenueViewMod...
asked by 23.06.2015 / 14:31
1
answer

ASP.NET MVC 5 Form Can not Access Model Properties

I'm starting in ASP.NET MVC, following tutorials and handouts on the internet I created a study project and I have some doubts. Well, first I created a following class structure: > Acesso -> Possui informações de identificacao(Login e...
asked by 24.10.2014 / 13:55
1
answer

Partial is not rendered

According to this link of another question of mine that ended up generating error where I followed the steps referring to another question, I'm having a rather strange error. I created a partial to do the manipulations in the Telephones t...
asked by 03.11.2014 / 21:06
1
answer

AJAX problem

I'm developing a site in ASP.NET MVC, I wanted it to change when my screen was refreshed, so my div .ESTRUTURA is the code: Javascript: function loadPage(page) { $.ajax({ type: 'GET', url: page, dataType:...
asked by 14.11.2014 / 13:12