Posts

Showing posts from November, 2018

Print content of iFrame to Printer using javascript

function printFrame ( ) { // id is id of iFrame var frm = document . getElementById ( id ). contentWindow ; frm . focus (); // focus on contentWindow is needed on some ie versions frm . print (); return false ; }

Some notes

1. In order to write a server variable that content HTML tag: @Html.Raw(description) 2. Mixing HTML and Server code: https://stackoverflow.com/questions/21301821/mvc-razor-add-if-statement-to-foreach-loop Link references: https://teamtreehouse.com/community/writing-a-razor-variable-to-the-view https://dzone.com/articles/crud-operation-in-aspnet-mvc-using-ajax-and-bootst