Is it possible for Visual Studio to check .aspx pages for compilation errors? For example, if I have a web form with this control:
<asp:Button ID="CancelButton" runat="server" OnClick="CancelButton_Click" Text="Cancel" />
If CancelButton_Click does not exist in the code behind, ask VS to execute the error while compiling the application. Currently, it is still compiling, but it throws an error at runtime. Is it possible? I understand that compilation time will increase significantly, but it would be useful to catch problems before runtime. I thought I read about the possibility of doing this using Asp.Net MVC views, but cannot find the link.
source share