开发者

asp - Cannot find method 'IsNullOrEmpty(String)' in 'String'

开发者 https://www.devze.com 2022-12-19 08:01 出处:网络
Trying to only print if a string isn\'t empty, and am using the code below, but it keeps coming up with that error...

Trying to only print if a string isn't empty, and am using the code below, but it keeps coming up with that error...

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

<%}%>

Also tried this:

<%if( o_handler.renderDesc() != null ) { %>
                        <strong>Description:</strong><BR>
                        <HR SIZE="1">
                        <strong><%= o_handler.renderDesc()%></strong>
                        <HR SIZE="1">
                        <BR>
                    <%} else { %>
开发者_高级运维
                    <%}%>

Here's the error:

Compiler Error Message: VJS1223: Cannot find method 'IsNullOrEmpty(String)' in 'String'


Looks like your page language is set to JScript. Try setting it to C#.

0

精彩评论

暂无评论...
验证码 换一张
取 消