Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i hav the above error every time i run my project on browser, the control could be display but the error message will just appear every time, any help would be appreciated. Thank you.
Posted
Comments
Guru Swaroop 25-Feb-14 23:17pm    
Can you show the fragment of the code from where you are trying to set the visibility of the object?

1 solution

Take any controls, there is nothing called SetVisible in .NET.
Only Visible is there. For example,
ASP
<asp:button id="btn" runat="server" text="Click Me !!" visible="True" xmlns:asp="#unknown" />

Or in code behind,
C#
btn.Visible = false;

And the naming convention for visibility you've provided that is similar to Java. So mind that :)

-KR
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Feb-14 0:42am    
It would be stupid to use methods for states, if properties exist, right? :-)
There is also IsVisible. I would not talk about "any controls", but in ASP.NET it's "Visible". (Voted 4.)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900