i
Web Application Fundamentals
Using Internet Information Services
Web Forms
ASP.NET MVC
Web Services
ASP.NET Features
Request/Response Programming
HttpRequest Class
HTTP Collections
HttpResponse Class
Redirection
HttpUtility Class
Using Visual Web Developer
Visual Studio Forms Designer
Using Components
Shadow Copying
Using the Global.asax File
Data Binding
Different Types Of Caching
How to use Object cache
Optimizing Your ASP.NET Application
What Is Caching [Storage]
Forms Authentication
Windows Authentication
ASP.NET Security Fundamentals
Data Source Controls
SqlDataSource
SiteMapDataSource
The AccessDataSource Control
ObjectDataSource
Connection String Storage
GridView
DetailsView
FormView
ListView
DataPager
Entity Data Model
EntityDataSource
Remote Method Calls
Ajax Control Toolkit
Ajax Client Library
Rich Client Applications
Ajax [Asynchronous JavaScript and XML]
ScriptManager
UpdatePanel
Model-View-Controller Pattern
ASP.NET MVC versus Web Forms
ASP.NET MVC Projects in Visual Studio
Action Methods in MVC
Routing in MVC
Strongly-Typed Views [Add images here from the visual studio]
Model Binding
Validation
ADO.NET [ActiveX Data Object]
ASP.NET Data Providers
Connections
Commands
DataReaders and Connected Access
DataSets and Disconnected Access
Action methods are the same as the method which we use in .net application. These methods are written in the controller class. This method returns the action result. The base class of all the action methods is the "ActionResult" class.
As per MSDN, a method must meet the following requirements:
The Action method must be public.
The Action method cannot be a static method.
The Action method cannot be an extension method.
The Action method cannot be a constructor.
The Action method cannot have open generic types.
The Action method cannot contain ref or out parameters
Action method return below type of result:
Name |
Framework Behavior |
RedirectToRouteResult |
It will return the specified view. It is from the same controller or another controller. |
PartialViewResult |
It will return HTML from the partial view. |
RedirectResult |
It provide URL for redirection. |
ViewResult |
It will return the HTML and Markup result. |
ContentResult |
It will write the string on the output stream. |
EmptyResult |
It will return the empty response. |
FileContentResult |
It will return the file content on the HTTP response. |
FilePathResult |
It read the file from the given location and writes the contents to the HTTP response. |
FileStreamResult |
Takes a file stream produced by the controller action and writes the stream into the HTTP response. |
HttpUnauthorizedResult |
It returns 403 when authorization fails. |
JavaScriptResult |
It returns the script result. |
Example of Action Result:
[HttpPost] public ActionResult Index() { return view(); } |
Don't miss out!