Can I do something like this in the markup of an asp.net page, based off the ‘Define DEBUG constant’ setting?
#IF (DEBUG) THEN <asp:TextBox ID='TextBox1' runat='server'>You're in debug mode</asp:TextBox> #END IF
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The close as I can get is:
This would give you problems if you wanted to have anything else in your Page_Load() event; the literal code above only works if the page/control has no code behind.
If I needed to do this, I would encapuslate the above code into a user control and include that control in the pages of interest.
My test user control looks like this: