这是最好的做法? [英] which is the best practice?

查看:73
本文介绍了这是最好的做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
这是为asp控件设置visible属性的最佳方法。

来自aspx或C#页面加载事件以及为什么?

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?

推荐答案

Hai

最好的方法是,你需要处理验证,可见真或假,即使在客户端插入,更新或删除,bcz用户不感兴趣页面刷新或等待页面刷新(页面命中服务器)频繁。如果页面命中服务器,则数据从服务器回溯,所以需要时间或不必要的回发页面。尝试使用后面的代码(客户端,aspx页面),不要尝试在服务器端事件。



注意:如果您在客户端(aspx页面)处理验证,显示或隐藏,它将快速响应。
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.


取决于应用程序。



如果是asp控件然后使用visiblity属性

如果它是html控件然后使用显示模式:none



当你使用visiblity = hidden时,控件将无法在页面上访问,但是如果你使用display mode:none则你可以访问con即使控件被隐藏也可以控制。



当你隐藏一个控件时,还有很多其他东西需要c。
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.


这篇关于这是最好的做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆