Summary of ASP. NET MVC

Source: Internet
Author: User
  • Actions

Contentresult (content): returns standard text

Filecontentresult (File): returns a file.

Filestreamresult (File): returns the file stream.

Filepathresult (File): returns the file stream.

Fileresult (File): returns a file.

Javascriptresult (JavaScript): returns JavaScript and runs it on the client.

Jsonresult (JSON): Return JSON

Partialviewresult (partialview): returns a local view.

Redirecttorouteresult (redirecttoaction): Jump

Viewresult (View): displays a view (which is the most commonly used)

  • Jump to the page or execute other actions

In fact, it is to jump to the action. If it is on the page, HTML. actionlink is implemented through the link. If it is on the server side, the redirecttoaction method is used.

  • Post

This is to add an attribute on the action.

[Acceptverbs (httpverbs. Post)]

And the method must have a parameter: formcollection (which represents the field in the form)

  • How to get

This is a standard action and does not require any settings. The default value is get.

 

  • How to Use User Control)

On the page, use the HTML. rendpartialview method. In controller, use the partialview method.

  • ASP. net mvc open-source project

Cartrackr http://cartrackr.codeplex.com/

Codecampserver http://code.google.com/p/codecampserver/

Http://flickrxplorer.codeplex.com/

Kigg http://www.codeplex.com/Kigg

MVC storefront http://blog.wekeroad.com/mvc-storefront/

Nerddinner http://nerddinner.codeplex.com/

Oxite

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.