i have button, gives print preview option of page viewing.
this works instead of loading print preview in same browser new browser opened , display preview when button clicked.
<a href='@url.action("index", "print", new { id = model.deliveryrunid })'> <button>print preview</button> </a>
any ideas?
you add target="_blank"
attribute anchor:
<a href="@url.action("index", "print", new { id = model.deliveryrunid })" target="_blank"> <button>print preview</button> </a>
remark: <button>
invalid element nested in anchor. you've got invalid html!
the correct approach here use normal anchor , css make button:
@html.actionlink( "print preview", "index", "print", new { id = model.deliveryrunid }, new { target = "_blank", @class = "button" } )
and of course css rule:
.button { ... }
Comments
Post a Comment