Click here to Skip to main content
15,917,862 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
#if DEBUG is not working in asp.net

I want set my home page based on debug and release mode.

What I have tried:

Windows project its working not in web application
Posted
Updated 29-Nov-16 20:01pm
Comments
F-ES Sitecore 30-Nov-16 4:12am    
It does work, the issue is how you're using it and where you're using it which you haven't said so no-one can help you.

1 solution

This is working for me
C#
#if DEBUG
    Response.Write("Mode=Debug");
#else
    Response.Write("Mode=Release"); 
#endif
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900