在asp.net中设置各种控件的ID [英] setting id of various controls in asp.net

查看:86
本文介绍了在asp.net中设置各种控件的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友有哪些规则或如何设置各种婚礼控件的名称(标识)

例如,对于按钮,我们使用btn(或vb中的cmd)
我们使用txt
的文本框
现在我想了解其他信息,例如dropdownlist/radiobutton/checkbox/fileupload/gridviews/listviews等......

对愚蠢的问题感到抱歉.

i friend what are rules or how to set names(identity) of various wed controls

for eg for button we use btn (or cmd in vb)
textbox we use txt

now i want to know about for others such as dropdownlist/radiobutton/checkbox/fileupload/gridviews/listviews etc...........

sorry for stupid question

推荐答案

我相信您所指的是匈牙利符号,添加了一个前缀(通常为三个字符)来表示其类型.这种方法已经过时了多年.

为您的控件和变量命名,这些信息和描述要有意义.
What I believe you are referring to is called Hungarian notation, adding a prefix, usually three characters, to denote its type. This method has been outdated for years.

Name your controls, and variables, something that is informative and descriptive.


这篇关于在asp.net中设置各种控件的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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