如何在ASP.NET中使用#if [英] How to use #if in ASP.NET

查看:93
本文介绍了如何在ASP.NET中使用#if的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#if DEBUG在asp.net中不起作用



我想根据调试和发布模式设置我的主页。



我尝试了什么:



Windows项目不在Web应用程序中工作

#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

推荐答案

这对我有用

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


这篇关于如何在ASP.NET中使用#if的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆