Is there an #IF DEBUG for Asp.net markup?

前端 未结 5 1416
野的像风
野的像风 2020-12-05 17:07

Can I do something like this in the markup of an asp.net page, based off the \"Define DEBUG constant\" setting?

#IF (DEBUG) THEN
  

        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 18:07

    How about using a Literal and then using #if DEBUG in your code-behind to inject html for your textbox into the literal? Also there are direct code blocks in ASP.NET but I don't know if they deal with #if statements; those seem to be reserved for the C# compiler.

提交回复
热议问题