Razor View Engine How-to - Abhimanyu Kumar Vatsa - E-Book

Razor View Engine How-to E-Book

Abhimanyu Kumar Vatsa

0,0
20,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Razor View Engine is an advanced view engine from Microsoft. Razor View is one of the most popular view engines which doesn't require you to explicitly close the code block. This book will help you understand and configure RazorView in your system to create dynamic web pages.

Instant Razor View Engine How-to will help you to make your application more MVC friendly with clean, lightweight code which is quicker and easier to understand compared to other view engines.

Instant Razor View Engine How-to introduces you to methods to make your web application more MVC friendly. The book begins by detailing the anatomy of RazorView Syntax and configuring Razor View as well as creating a web application project which will also help you to select an appropriate programming language. The later section of the book goes on to discuss creating view templates and creating View pages using Razor syntax. By the end of the book, you will also be familiar with Razor directives, helper components, and work with Partial views to reuse razor code throughout the application.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 56

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Instant Razor View Engine How-to
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Instant Razor View Engine How-to
Introduction
Why Razor?
Versions
Prerequisites
Creating the project (Should know)
Getting ready
How to do it...
There's more...
Fundamental Razor syntaxes (Must know)
Getting ready
How to do it...
Inline code expressions
Code block expression
Mixed code expression
Razor layout pages (Become an expert)
Getting ready
How to do it...
How it works...
There's more...
Models in Razor (Must know)
Getting ready
How to do it...
Creating a data model class
Scaffolding view templates
@inherits and @model directives
Manually adding view templates
There's more...
Razor helpers (Must know)
Getting ready
How to do it...
HTML helpers using the extension method
HTML helpers using the @helper syntax
Standard HTML helpers
Input helpers
Form helpers
Validation helpers
Link helpers
Label helpers
How it works...
There's more...
Partial views (Should know)
Getting ready
How to do it...
Partial helper
RenderPartial
Action and RenderAction helpers
How it works...
There's more...

Instant Razor View Engine How-to

Instant Razor View Engine How-to

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2013

Production Reference: 1160513

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-84969-630-2

www.packtpub.com

Credits

Author

Abhimanyu Kumar Vatsa

Reviewer

Ahsan Murshed

Acquisition Editor

Akram Hussain

Commissioning Editor

Shreerang Deshpande

Technical Editor

Nitee Shetty

Project Coordinator

Siddhant Shetty

Proofreader

Maria Gould

Production Coordinator

Prachali Bhiwandkar

Cover Work

Prachali Bhiwandkar

Cover Image

Sheetal Aute

About the Author

Abhimanyu Kumar Vatsa works at Coxtan College, located in Bokaro Steel City, India as a lecturer focused on web technologies. He is a Microsoft MVP in ASP.NET/IIS. He loves to blog and started blogging in June 2009. He holds a bachelor's degree in Computer Science and Applications, a master's degree in Information Technology, and a few application-level diplomas. He moved to Bokaro Steel City from a remote village to pursue higher education in March 2003, and that was when he saw a computer with Windows 95 OS on Pentium 1 for the first time, and since then, he has never looked back.

A big thank you to my mom, dad, my sister Ambuj, my brother Avnish, the Indian MVP Community, and to you for reading this book. Enjoy!

About the Reviewer

Ahsan Murshed is an ex-MVP (Microsoft Most Valuable Professional) for the period of 2011-2013. Now he is working as a software engineer, with more than 6 years of experience in the design, prototyping, development, and deployment of various scales of business solutions. He is interested in working on large scale business applications such as MS SharePoint, MS Dynamics CRM, and so on.

I would like to dedicate this book to my family, my parents, wife, and Ayesha, and also to my friends who give me tremendous support. Thank you friends for all your support.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

Welcome to Instant Razor View Engine How-to. This book will take you on a journey through using the Razor view engine in MVC applications. In the very beginning of the book, we will learn why this technology is useful by comparing with other view engines, and as you progress you will learn inline codes, block codes, mixed codes, conditional and repetitive statements, layouts and nested layouts, directives, scaffolding, models, directives, helpers with extension and declarative, partial views, and much more about Razor with some really unique examples.

You will find this book a vital companion as you progress through your reading. So let this Razor journey begin!

What this book covers

Creating the project (Should know) helps you learn how to get a project ready to start writing Razor syntaxes.

Fundamental Razor syntaxes (Must know) shows you the syntactic differences between Razor and ASPX view engines. You will also learn about inline code expressions, code block expressions, mixed code expressions, conditional statements, loops, comments, text tags, language parsers, and much more.

Razor layout pages (Become an expert) helps you learn about all the concepts of layout pages, nested layout pages, RenderBody, RenderSection, and much more in detail.

Models in Razor (Must know) helps you learn the concept of models, scaffolding views, directives, and much more.

Razor helpers (Must know) talks about helpers with extension methods, declarative syntax, and standard helpers.

Partial views (Should know) explores partial views including Partial helpers, RenderPartial helpers, Action helpers, RenderAction helpers, and much more.