mvc consistent route parameters without re-initializing every action
Posted
by Ayo
on Stack Overflow
See other posts from Stack Overflow
or by Ayo
Published on 2010-05-13T18:39:00Z
Indexed on
2010/05/13
18:44 UTC
Read the original article
Hit count: 236
Trying to consistently tack on a route parameter for every action without having to set it every action I tried this with ViewData but it seems ineffecient to do to every action. when I have over 40-50 actions, and Sessions are a no go for me. Is there a simpler way through filters or something else I could use?
eg. http://localhost/myController/myView?param=foo
eg. http://localhost/myController/myView/myID?param=foo
(needs to be tacked on id automatically)
© Stack Overflow or respective owner