DCSIMG
web - IronShay

Browse by Tags

All Tags » web (RSS)

Razor Tip #1: Explicitly Stating Statement Boundaries

Razor, the new ASP.NET MVC view engine is incredible. I like it. A LOT. Great work Microsoft! In this series of posts I’m going to share some handy tips and tricks that can enhance your experience with this new view engine. Enjoy! The Problem You have to output a variable value and add some markup content immediately after it. For example, assume you have a variable holding a value representing a font size and you want to output it inside a style attribute, as follows: But oh no! Razor can’t tell...
Posted by shayf | with no comments
תגים:, , ,

Printing Web Pages – the Cool Way!

When developing web applications we often run into a request to print one or more pages within the applications. In most cases, these pages will contain some type of report. There are tons of ways to do that. Most of them I don’t like, especially the trivial one that pops to mind - “open a new window with a printer-friendly version of the page and set onload=’window.print()‘” . I find it quite irritating for the user. There is another solution, which is less popular than its fellow window.open solution...
Posted by shayf | 2 comment(s)
תגים:, ,