I have an ASPX page with no code behind (that is, no .aspx.cs with the same name). In the code is this line:
<div style="overflow: hidden; text-align: center; z-index: 105;">
<%= MainNavBarHTML %><%= SubNavBarHTML %>
</div>
I've searched the rest of the program for MainNavBarHTML and SubNavBarHTMl, but can't find any reference to them. How do I find what fills those elements?
You might want to check out the CodeFile vs CodeBehind question.
If your ASPX markup has the CodeFile directive, it will look for the associated .cs file:
<%@ Page
Language="C#"
CodeFile="CustomerDetail.aspx.cs"
Inherits="SomePage" %>
If, instead, it has the CodeBehind directive listed it will look in the Bin folder for an assembly that has the class defined:
<%@ Page
Language="C#"
CodeBehind="CustomerDetail.aspx.cs"
Inherits="SomePage" %>
The naming of these two directives is beyond unfortunate. If the application is using CodeBehind (which it sounds like it is) you may not have access to the source and will be unable to view the definition for those properties, short of using a .NET reflection tool against the compiled assemblies.
In Visual Studio, Put your cursor on the text and press F12 to jump to definition or right-click on the text and choose "Go to definition".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With