asp.net mvc - Is Index.cshtml inconvenient name for developing in MVC4? -
basically, every new controller have index.cshtml view believe standard behavior mvc projects. have 3 gripes practice:
if have more 1 index.cshtml opened in visual studio, can't tell which looking @ tab.
when doing check-in tfs have check folder name know index.cshtml want check-in.
in pending changes files listed alphabetically means index.cshtml not next controller file , model file.
do find bothersome or there better practice i'm not aware of?
if have more 1 index.cshtml opened in visual studio, can't tell which looking @ tab. i hover on tab see path recognize. also, many times can identify viewing
viewbag.title
or rest of code.when doing check-in tfs have check folder name know index.cshtml want check-in.
- in pending changes files listed alphabetically means index.cshtml not next controller file , model file. as such use vs 2012, actions view pending changes, check-in, opens files in right side bar - tfs explorer window states folder structure above file useful.
as per convention in mvc, controller searches view should same action in controller. index action
, index.cshtml
.
if want simplify search, try giving meaningful names view i.e. combination of controllers name , action. however, reflect in url/routes have manage accordingly in route.config settings.
Comments
Post a Comment