What are the naming guidelines for ASP.NET controls?

后端 未结 18 1917
离开以前
离开以前 2020-12-07 21:23

We are in the process of nutting out the design guidelines we would like to use in our development team and got into a discussion today around how ASP.NET controls should be

18条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 21:56

    I tend to go with the control type as a prefix and the name of the control afterwards but I always CamelCase so in your example for different types of controls you might have..

    • TxbFirstName
    • DdFirstName
    • ChbFirstName

    For intellisense reasons I also always fully qualify the name of the control so I wouldn't do any of the following...

    • TxbFName
    • TxbClientNo
    • TxbNoOfCpn

    But ultimately down to personal preference

提交回复
热议问题