-1
I’m trying to send the value of checkboxwith id, if the checkbox be it true, will create the column.
VIEW
<div class="checkbox dadospessoais">
                                            <label>
                                                <input class="dadospessoais" type="checkbox" name="ckNome" id="ckNome" /> Nome
                                            </label>
                                        </div>
                                        <div class="checkbox">
                                            <label>
                                                <input class="dadospessoais" type="checkbox" name="ckNomeSocial" id="ckNomeSocial" /> Nome Social
                                            </label>
                                        </div>
MODEL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace QJW.Web.Models.RHViewModel
{
 public class FiltroRelatorioCheckbox
    {
        public bool ckNome { get; set; }
        public bool ckNomeSocial { get; set; }
 }
CONTROLLER
PART OF WHERE I WANT TO WORK WITH THE RESULTS OF CHECKBOX.
public ActionResult Imprimir( QJW.Web.Models.RHViewModel.FiltroRelatorioCheckbox ckModel)
 {
             if (ckModel.ckNome)
            {
                new DataColumn("Nome", typeof(string)) { AllowDBNull = true };     
            }
}
I put a breakpoint in the if, and the ckNome always comes false.
You use routes or controller/action?
– Lucas Antonio
use but for other screen, I’m trying to get the value of the checkbox only use this actionResult there that I put
– Cardoso