Coding in Razor When last we met… In the last installment, we took a look at partial…
ASP Tutorials and Articles
In the first installment, we explained what Razor was, set up our development environment, downloaded the MVC 3 preview and looked at the contents of the default project. We then took a look at the structure of a content view file using the Razor view engine and compared it to a content view file build with the standard aspx view engine.
Razor is an alternate view engine for asp.net MVC. It was introduced in the “WebMatrix” tool and has now been released as part of the asp.net MVC 3 preview 1. Basically, Razor allows us to replace the clunky <% %> syntax with a much cleaner coding model, which integrates very nicely with HTML. Additionally, it provides some really nice features for master page type scenarios and you don’t lose access to any of the features you are currently familiar with, such as HTML helper methods.
A common feature of any programming script/language is, its ability to perform repeat tasks until a condition is satisfied, and, its ability to take decision. After all, there can be no logic if a program cannot decide what to do and what not to do (sounds like a Shakespearean statement).
Last time you learnt how to receive or send form data using ASP. Let’s now see how we can send HTML messages using the Active Server Pages. The process is quite similar to sending the regular, text message, but yes, there are a few modifications.
There comes a time when you have to create very complex, very comprehensive online forms consisting of 30 to 40 fields. While debugging the form output, or while validating the individual form fields (for example, if all the fields have been filled), you need to dump all the form field with their names and with their respective values onto a web page so you can see exactly what is coming from where. This tutorial tells you how to do that.
Connect With Us
Dec 24, 2014 - 0 Comment
Dec 19, 2014 - 0 Comment
Dec 16, 2014 - 0 Comment
Apr 15, 2008 - 94 Comments
Aug 6, 2008 - 20 Comments
Mar 7, 2008 - 13 Comments
Recent Questions & Answers
- How do I submit a tutorial?
- asked 2 months ago
- [ASK] About Write for Us (developertutorials.com)
- asked 12 months ago
- How can I run PHP and MySQL locally on my Windows machine?
- answered 1 year ago
In Excel how can I break fullname into first name and last name?
- asked 1 year ago