Use a == instead of = like:
if (txtUserId.Text.Length == 0)
>Hello,
>
> I just came across something that I don't understand. What is wrong with the following C# code?
>
>if (txtUserId.Text.Length = 0)
>
>The compile error was "Cannot Implicitly convert type 'int' to 'bool'.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi