attributes - Configure access to View's SubFolders in ASP.NET MVC -



attributes - Configure access to View's SubFolders in ASP.NET MVC -

i wondering if possible next asp.net mvc 5.

i have ordercontroller , next folder's construction

view/orders/details/

i need know how can configure methods details folder?

i mean create/edit/list.

have utilize method attribute or routing , how should done?

thanks!

p.s.

i found useful link http://blogs.msdn.com/b/webdev/archive/2013/10/17/attribute-routing-in-asp-net-mvc-5.aspx

you have 2 options. can either create own code determine right view homecoming complex or can specify view need using total path. additionally if have have methods same (not sure why want that), need alter routing. alternative utilize attribute routing.

public class orderscontroller : controller { [route("createorder")] public actionresult create(order order) { //snip homecoming view("~/views/orders/details/create.cshtml"); } [route("createorderdetails")] public actionresult create(orderdetails orderdetails) { //snip homecoming view("~/views/orders/details/create.cshtml"); } }

asp.net-mvc attributes asp.net-mvc-5 asp.net-mvc-routing project-structure

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -