For a school project, I’m forced to use Visual Studio and ASP to implement an interactive course catalogue website. Due to time constraints, we’re putting together a table-based design where one column implements a MultiView and the other shows a GridView.
The first MultiView implements a ListView along with a text search bar. When a user makes a selection in the ListView, the goal is to fire off the ListBox1_SelectionIndexChanged event handler, whose job is to execute a query based on the SelectedIndex.
All fine and dandy… or at least it seemed.
In practice, however, the entire .cs file is getting skipped over for some reason. I found this out when setting several breakpoints for debugging only to find out that setting breakpoints on global array declarations as well as the Page_Load methods were ignored when running the debugger.
I thought it could be something with the header of the aspx file. However, given that the aspx file is named Default.aspx and the CodeBehind field has Default.aspx.cs listed.
So, what the heck is going on here?
Make sure the
<%@Page %>directive at the top ofDefault.aspxspecifies the following:Note that the
Inheritsattribute refers to the partial class name inDefault.aspx.cs, which will probably be called_Default.