Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

ASP.Net MVC

ASP.Net MVC Topics

QuestionAnswer
Webforms vs. MVC 1. Webforms: url = page; MVC: url=controller action. 2. Webforms: content-centric; MVC: logic centric
URL Routing routes incoming requests to controller actions
Route Table Creation Application_Start() method calls the RegisterRoutes() method and the RegisterRoutes() method creates the default route table.
default route breaks all incoming requests into three segments: controller name, action name, and a parameter passed to the action named Id.
default route default values The default Controller is HomeController, the default Action is Index, and the default Id is an empty string
controller determines what response to send back to a user when a user makes a browser request; must contain suffix -Controller
action public method on a controller
view contains HTML and markup to be sent to the browser
view location controller views must be located in \Views\[Controller Name]\[Action Name].aspx
controller requirements 1. must contain suffix -Controller, 2. must reside in \Controllers folder 3. must reference System.Web.Mvc and System.Web.Mvc.Ajax, 4. must inherit from controller class
action requirements 1. must be public, 2. cannot be overloaded, 3. cannot be shared
six action results 1. ViewResult: HTML and markup. 2. EmptyResult:no result. 3. RedirectResult: redirection to a new URL 4. RedirectToRouteResult: redirection to a new controller action 5. JsonResult: a JavaScript Object Notation 6. ContentResult – plain text.
6 result return methods View,Redirect,RedirectToAction,RedirectToRoute,Json,Content
<%= %> shortcut for Response.Write()
HTML Helper method that generates a string
ViewData property a collection of name and value pairs used to pass data from a controller to a view
Html.Encode() HTML Helper encodes special characters such as < and > into characters that are safe to display in a web page
4 web.config sections for URL Routing system.web.httpModules section, system.web.httpHandlers section, system.webserver.modules section, and system.webserver.handlers
custom route requirements custom routes should be added before default routes
2 ways to prevent Javascript injection attacks 1. Encode the view, 2. Encode the controller
HTML Encoding in View <%=Html.Encode([text])%>
HTML Encoding the Controller Server.HtmlEncode([text])
model binder allow you to map incoming form post values to complex .NET types passed as Controller action method parameters
Created by: jhlee5
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards