Hi , all
I've been using If .. Then .. Else Clause for thousand time but maybe i'm new in ASP.NET
Please see code below.
I did double check the "String.IsNullOrEmpty(ShareDB.Tables(0).Rows(0).Item("Modified_By_ID").ToString" .... It gave me True.
Because of "Not" in front of "String.IsNullOrEmpty(ShareDB.Tables(0).Rows(0).Item("Modified_By_ID").ToString" ... so the result will be "False".
If the Condition return false .... things under Then .... End If must not be display , am I right ?
But my problem is it's displayed ( which not supposed to )
Can somebody explain me this ?
I've been using If .. Then .. Else Clause for thousand time but maybe i'm new in ASP.NET
Please see code below.
Code:
<% If Not (String.IsNullOrEmpty(ShareDB.Tables(0).Rows(0).Item("Modified_By_ID").ToString)) Then%>
<u>Modified By</u> : <%#FetchDB("User_FullName", "Company_User", "User_ID = " & Eval("Modified_By_ID"))%><br />
<u>Modified At</u> : <%#Eval("Reserved_At")%>
<% End If%>
I did double check the "String.IsNullOrEmpty(ShareDB.Tables(0).Rows(0).Item("Modified_By_ID").ToString" .... It gave me True.
Because of "Not" in front of "String.IsNullOrEmpty(ShareDB.Tables(0).Rows(0).Item("Modified_By_ID").ToString" ... so the result will be "False".
If the Condition return false .... things under Then .... End If must not be display , am I right ?
But my problem is it's displayed ( which not supposed to )
Can somebody explain me this ?
Last edited: