C# asp-找不到方法';IsNullOrEmpty(字符串)和#x27;在';字符串';

C# asp-找不到方法';IsNullOrEmpty(字符串)和#x27;在';字符串';,c#,asp.net,C#,Asp.net,尝试仅在字符串不为空时打印,我使用下面的代码,但它不断出现错误 <%if(!String.IsNullOrEmpty(o_handler.renderDesc())) { %> <strong>Description:</strong><BR> <HR SIZE="1"> <strong&

尝试仅在字符串不为空时打印,我使用下面的代码,但它不断出现错误

<%if(!String.IsNullOrEmpty(o_handler.renderDesc())) { %>
                        <strong>Description:</strong><BR>
                        <HR SIZE="1">
                        <strong><%= o_handler.renderDesc()%></strong>
                        <HR SIZE="1">
                        <BR>
<%} else { %>

<%}%>

说明:



我也试过:

<%if( o_handler.renderDesc() != null ) { %>
                        <strong>Description:</strong><BR>
                        <HR SIZE="1">
                        <strong><%= o_handler.renderDesc()%></strong>
                        <HR SIZE="1">
                        <BR>
                    <%} else { %>

                    <%}%>

说明:



以下是错误:


编译器错误消息:VJS1223:在“字符串”中找不到方法“IsNullOrEmpty(String)”

看起来您的页面语言已设置为JScript。尝试将其设置为C#。

我不知道这意味着什么,但我知道我不允许更改页面语言,因为这会导致其他页面崩溃。。。有没有办法用这种语言实现我想要的功能?你有没有尝试过
——这是两个没有空格的双引号。这是经典的ASP,还是ASP.NET?