Click here to Skip to main content
16,018,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi Which is the best way to set the visible property for an asp control.
from aspx or in C# page load event and why?
Posted
Comments
[no name] 18-Mar-14 2:51am    
Use Visibility property of a control make it false or true. it will work.
Otherwise if you tried something else then show here if any problem anyone can help you
[no name] 18-Mar-14 2:55am    
Set by default put false and in form_load put visibility true to display!

Hai
The best way is ,u need to handle validation,visible true or false, even though insert,update or delete in client side,bcz user not interest to page refresh or wait for page refresh(page hit the server) frequently.if page hit the server ,then data are retrive from server ,so it take time or unnecessary post back page.Try to use code behind side (Client side,aspx page),dont try in server side event.

Note: if u handle validation,show or hide in client side(aspx page) it will quick response.
 
Share this answer
 
v3
that depends on the application.

if it is asp control then use visiblity property
if it is html control then use Display mode : none

when u use visiblity= hidden then the control will not be accessible on the page but if u use display mode : none then u can access the control even when the control is hidden.

there are lot of other things which ull have to c when u hide a control.
 
Share this answer
 

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



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