How to call the printer on a page made in ASP.Net MVC?

0

I would like to call the printer, even if the page is being accessed by the mobile.

<div class="container droppedHover">

    <div class="row">
        <div class="span6">
            <button class="btn btn-lg btn-block btn-success glyphicon glyphicon-print" type="submit" >  Impressão</button>
            <a href="@Url.Action("Index", "MenuPrincipal")" class="btn btn-lg btn-block btn-warning glyphicon glyphicon-hand-left">
                Retorno
            </a>
        </div>
    </div>

</div>
    
asked by anonymous 01.01.2016 / 23:54

1 answer

2

Just create an event to open the print window:

<div class="container droppedHover">

    <div class="row">
        <div class="span6">
            <button class="btn btn-lg btn-block btn-success glyphicon glyphicon-print" type="submit" onClick="window.print()">  Impressão</button>
            <a href="@Url.Action("Index", "MenuPrincipal")" class="btn btn-lg btn-block btn-warning glyphicon glyphicon-hand-left">
                Retorno
            </a>
        </div>
    </div>
</div>
    
02.01.2016 / 00:08