c# - Web Development using Razor vs Web Forms - when to use one over the other? -
i'm learning ins , outs of asp.net (previously coded in c#, differnt flavors of vb, etc). i'm noticing in when creating kind of website have option of using plain old web forms or razor v3.
i've come across multiple tutorials/documentation part developers using web forms, @ time notice razor v3 used.
what limitations of razor v3?
to me seems razor v3 easier code since parses server side code html should used more powerful applications?
when should use 1 on other?
it helps not confuse stacks syntax. can use razor syntax @
asp.net mvc, asp.net web pages - , can use aspx syntax <%=
asp.net web forms , asp.net mvc.
there other third-party syntax providers asp.net mvc, known viewengines
. mention t4 syntax (<#= #>
) example of third-party viewengine can use. asp.net web forms not directly support third-party view-engines.
stack aspx <%= razor @ t4 <#= ----------------------------------------------------- asp.net web forms yes no no asp.net mvc yes yes yes asp.net web pages no yes (unsure) asp.net core web pages no yes (unsure) asp.net core mvc no yes (unsure)
asp.net core removed support web forms , aspx syntax (in both web pages , mvc stacks), , third-party view-engines need modifications run on asp.net core.
visual studio 2008 , possible 2010 , 2012 supported aspx view-engine asp.net mvc (as in, generate aspx-based view files aspx scaffolding) feature removed , visual studio 2015 , 2017 support generating razor-based view files, still support aspx files in web forms projects.
Comments
Post a Comment