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:

  1. if have more 1 index.cshtml opened in visual studio, can't tell which looking @ tab.

  2. when doing check-in tfs have check folder name know index.cshtml want check-in.

  3. 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?

  1. 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.

  2. when doing check-in tfs have check folder name know index.cshtml want check-in.

  3. 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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -