Can I duplicate this classic ASP pattern in ASP.NET MVC? -
virtuall every asp app i've written (hundreds) follows exact same pattern. "single page app" header , footer, , dynamically updated content area changes depending upon going on/in url. following (very simplified, demonstrates principle):
[% select case lcase(request("action") %] [% case "home" %] [div class='class_home'...] home screen html/script/asp [/div] [% case "enroll" %] [div class='class_enroll'...] enroll screen html/script/asp [/div] [% case "checkout" %] [div class='class_checkout'...] [!-- if it's gonna lengthy, instead: --] [!-- #include file=checkout.inc.asp --] [/div] [% end select %]
this pattern may nested several layers deep additional request("subaction") subarea/subforms involved. every form submits ([form action="" method=post]), , asp script @ top catches form , processes it, continues.
so, question is, pattern still done inside mvc? or have duplicate common areas on , on again in each separate page create?
is idea want this? or there better way accomplish same goal of "single page app"?
thanks!
edit: here's example. it's been out of date few years now, demonstrates design pattern i'm talking about. can complex in mvc?
if want login, use auction code "wallace", , "guest" both name , password. can see facing in switching mvc. these not simple, webapps. gets quite complex @ times. need know if able in mvc asp.
this still same in mvc. if using razor, _layout.cshtml
file in /views/shared
. if using old asp.net engine, in same location called masterpage
.
aditionally, there file called _viewstart.cshtml
. invoked automatically framework, , points _layout.cshtml
file.
Comments
Post a Comment