File filters:
In the 'Find in Files' (ctrl-shift-f) dialog, you can also use 'Look at these files types:' to limit your search to specific file types and exclude others.
Eg: if you only want to search in .cshtml files but not in .js files, you can set the 'Look at these files types:' field to:
*.cshtml
 
Outputs:

 
Eg2: you can add multiple file types by separating them with a semicolon ';':
*.cshtml;*.cs
 
Eg3: files to search:
*.cshtml;*.cs;*.css
 
 
 
How to grep for a string within Visual Studio:
To grep a solution, use the find function:

 
Click here to go to the location of the current line:
