Call action Get that returns a view by jquery ASP.NET MVC [closed]

0

I need to open the view create when I click on a button, how to do this for Jquery?

  

Button

<div class="col-md-3">
            <button id="btnNovo" class="btn btn-info form-control" style="width: 200px"> Novo </button>
        </div>
  

Script

 <script>
        jQuery(document).ready(function () {


            $('#btnNovo').click(function () {                

            });

            $("#filtro").on("keyup", function () {
                var value = $(this).val().toLowerCase();
                $("#myTable > tr").each(function () {
                    $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
                });
            });

        });
    </script>
  

Action

// GET: Pais/Create
        public ActionResult Create()
        {
            ViewBag.cadastradoComSucesso = false;
            ViewBag.cadastroComErro = false;

            PaisModel paisModel = new PaisModel();
            paisModel.Ativo = true;
            paisModel.DataCadastro = DateTime.Now;
            paisModel.UsuarioCadastro = "USUARIO CADASTRO";

            return View(paisModel);
        }
    
asked by anonymous 24.10.2017 / 16:59

1 answer

3

Based on the comments, what you want is to use CSS for the anchor ( <a> ) to have a button appearance ( <button> ).

.btn {
  appearance: button; /* CSS3 */    
  -webkit-appearance: button; /* Safari and Chrome */
  -moz-appearance: button; /* Firefox */
  -ms-appearance: button; /* Internet Explorer */
  -o-appearance: button; /* Opera */
  cursor: default;
  padding: 5px 15px; 
  color: #000;
  text-decoration: none;
}
<a class="btn" href="http://www.google.com.br">Sou um botão</a>
    
24.10.2017 / 17:18