Avatar of ptemo

asked on 

C sharp logic question


Really new to C #, all I want to do is a simple if and statement, but I just cant figure it out.  Can someone please tell me what I'm doing wrong.  I'm wriiting a c sharp statement in asp.net environment.  

Here is the code, but It doesnt work, I keep getting an error message that says: Operator '&&' cannot be applied to operands of type 'bool' and string'.  

 void valComments_ServerValidate(Object source, ServerValidateEventArgs args)
        if (args.Value.Length <= 30 && ins.Text = 1)
            args.IsValid = false;
            args.IsValid = true;

Thanks in advance

C#CVisual C++.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon