dc

dc

  • NA
  • 663
  • 0

development versus production access

Jan 7 2019 10:07 AM
In  a c#.net 2010 application, I have a page_load section of code where I would like to know add extra code unless I need it. Basically if the application is in development or  test compile mode, I would like the application to point to a test url. If the application is in production mode, I would like the application to point to a production url. 
 
From the page_load section of code, is there a way to knowwhat mode the applicaiton is in? If so, can yhou show me the code on how to accomplish this goal?
 
In addition, if the application is in production mode is there a way to not have the development or test logic be accessed by the application? If so, would you show me that logic? 

Answers (2)