在使用控件的时候,难免要对控件命名,一个好记且规范的命名能够使人一目了然。这里统计了一些控件常用的缩写方式,希望可以帮助到大家。
注意:命名一定不要采用拼音,真的很难理解!!!如果实在不会请使用翻译软件
| 类型 | 前缀 | 示例 | |:----------------------:|:----:|:--------------------:| | AdRotator | adrt | adrtTopAd | | Button | btn | btnSubmit | | Calendar | cal | calMettingDates | | CheckBox | chk | chkBlue | | CheckBoxList | chkl | chklFavColors | | CompareValidator | valc | valcValidAge | | CustomValidator | valx | valxDBCheck | | DataGrid | dgrd | dgrdTitles | | DataList | dlst | dlstTitles | | DropDownList | drop | dropCountries | | HyperLink | lnk | lnkDetails | | Image | img | imgAuntBetty | | ImageButton | ibtn | ibtnSubmit | | Label | lbl | lblResults | | LinkButton | lbtn | lbtnSubmit | | ListBox | lst | lstCountries | | Panel | pnl | pnlForm2 | | PlaceHolder | plh | plhFormContents | | RadioButton | rad | radFemale | | RadioButtonList | radl | radlGender | | RangeValidator | valg | valgAge | | RegularExpression | vale | valeEmail_Validator | | Repeater | rpt | rptQueryResults | | RequiredFieldValidator | valr | valrFirstName | | Table | tbl | tblCountryCodes | | TableCell | tblc | tblcGermany | | TableRow | tblr | tblrCountry | | TextBox | txt | txtFirstName | | ValidationSummary | vals | valsFormErrors | | XML | xmlc | xmlcTransformResults |