简体   繁体   中英

Any good documentation on ASP.NET MVC3 action methods?

I have been trying to find out about ASP.NET MVC action methods or whatever the proper reference is for these:

[TestClass]
public class HomeControllerTest
{

[TestMethod]
public void About()
{

I have seen a lot of them and wondered if there is a list or reference somewhere?

Thanks so much.

Here is the most basic form of creating an attribute . Here is some information on attributes in Asp.Net Mvc 2 (this is still applicable to Mvc3). You should also do a search on Data Annotations -- This is how you can do a lot of validation on your models.

Look at all the 'attribute' ending list here: http://msdn.microsoft.com/en-us/library/system.web.mvc(VS.100).aspx

Data annotation are listed here:

http://msdn.microsoft.com/en-us/library/dd901590(v=vs.95).aspx

FYI the ones above you mentioned have nothing to do with MVC, they are test project attributes only

Attributes are used to embed additional metadata information about types, members and assemblies. Many CLR functionalities like serialization, security etc are implemented via attributes. We can define our own attributes and use them with class, members etc. The additional information is compiled into underlying assembly and can be retrieved at runtime via reflection.

For more on attributes, check out : Attributes in C#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM