I want to generate a view or partial view from actionby clicking "Add View" button. But as you can see the button is disabled and I cannot generete anything.
I'm using the latest version of Visual Studio 2022.
I want to generate a view or partial view from actionby clicking "Add View" button. But as you can see the button is disabled and I cannot generete anything.
Actually, your Add button is disabled because you have either removed model class /templete value or haven't selected anything which causing the issue.
Most importantly, While selecting view you should take either you should select context model or if there is not relevant model class it should select to Empty or without model
from the dropdown, other than, your Add button would be disabled.
I have reproduced your issue accordingly as you can see down below:
How to resolve:
You can follow below steps to include your view:
Output:
Note: Please refer to this official document if you would like to know more details.