views:

114

answers:

1

I have two custom attributes in my asp.net mvc(C#) application.

[CustAttribute1()]
[CustAttribute2()]

When i use those attributes to my actions, which will get execute first?

[CustAttribute1()]
[CustAttribute2()]
public ActionResult Index()
{

Can i use more than one custom attributes for my actions? If so, in the above Action, which custom attribute will execute first?

+3  A: 

Set the Order property.

[CustAttribute1(Order=2)]
[CustAttribute2(Order=1)]
public ActionResult Index() {
    return View();
}
Darin Dimitrov
thanks for this hint darin
Prasad