Problems with If Statement (ASP.NET)
Dim custEmail As String
Dim inputEmail As String
custEmail = dt.Rows(0).Item("email")
inputEmail = email_add.Text
if (custEmail.toString() == inputEmail.toString() ){
label1.Text = custEmail
}
End If
This code is giving an error: Compiler Error Message: 开发者_如何学运维BC30201: Expression expected.
I just basically want to check if two values are equal but its saying something about expression expected although i've given the expression to evaluate.
The above is a mix of vb.net and c# syntax. You can use either in .net with success but not both at the same time. Get rid of the {
and }
to stick with vb.
Looks like you are mixing C# and VB.Net. Assuming you are using VB.Net Replace the '{' with Begin IF and remove the '}'.
精彩评论