Programming Microsoft ASP.NET MVC Flashcards
1
Q
ASP
A
Active Server Page
2
Q
Razor Syntax Rules for C#
A
- Razor code blocks are enclosed in @{ … }
- Inline expressions (variables and functions) start with @
- Code statements end with semicolon
- Variables are declared with the var keyword
- Strings are enclosed with quotation marks
- C# code is case sensitive
- C# files have the extension .cshtml
3
Q
Main Razor Syntax Rules for VB
A
- Razor code blocks are enclosed in @Code … End Code
- Inline expressions (variables and functions) start with @
- Variables are declared with the Dim keyword
- Strings are enclosed with quotation marks
- VB code is not case sensitive
- VB files have the extension .vbhtml
4
Q
The root on a disk drive C:\ (backwark slash)
A
The root on a web site is / (forward slash).
5
Q
~ Operator
A
Virtual root in programming code
6
Q
Server.MapPath Method
A
The Server.MapPath method converts a virtual path (/default.cshtml) to a physical path that the server can understand
7
Q
- href
- RenderBody()
- RenderPage(page)
- RenderSection(section)
- Write(object)
- WriteLiteral
A
- Builds a URL using the specified parameters
- Renders the portion of a content page that is not within a named section (In layout pages)
- Renders the content of one page within another page
- Renders the content of a named section (In layout pages)
- Writes the object as an HTML-encoded string
- Writes an object without HTML-encoding it first.
8
Q
- IsPost
- Layout
- Page
- Request
- Server
A
- Returns true if the HTTP data transfer method used by the client is a POST request
- Gets or sets the path of a layout page
- Provides property-like access to data shared between pages and layout pages
- Gets the HttpRequest object for the current HTTP request
- Gets the HttpServerUtility object that provides web-page processing methods
9
Q
A
non-breaking space
10
Q
MVC
A
- Models: Classes that represent the data of the application and that use validation logic to enforce business rules for that data
- Views: Template files that your application uses to dynamically generate HTML responses
- Controllers: Classes that handle incoming browser requests, retrieve model data, and then specify view templates that return a response to the browser
11
Q
IDE
A
Integrated development environment
12
Q
Default MVC URL
A
/[Controller]/[ActionName]/[Parameters]
13
Q
C# optional-parameter
A
- function ( x = 1 )
- = 1 is optional
14
Q
- &
- ?
A
- The & character separates query strings
- The ? character separates the URL and query strings
15
Q
EF
A
- Entity Framework
- Use for accessing data