当前位置: 代码迷 >> .NET组件控件 >> 自定义控件的疑惑,该怎么处理
  详细解决方案

自定义控件的疑惑,该怎么处理

热度:6999   发布时间:2013-02-25 00:00:00.0
自定义控件的疑惑
Create a user login control, create a UserName property, Password property and OldUserNamePasswordPair.
Enable UserName can be changed by UI design, and Password can only be set in code (cannot be changed by UI design).
Set the OldUserNamePasswordPair property as Obsoleted.


------解决方案--------------------------------------------------------
登陆控件 ?

咋 了
------解决方案--------------------------------------------------------
创建一个用户登录控件,创建一个用户名属性,密码。
启用用户名可以改变用户界面设计,密码只能在代码中(不能由UI设计变更)设置。
--------------------------
有什么问题?
------解决方案--------------------------------------------------------
OldUserNamePasswordPair 这个属性还要设置为过时的
------解决方案--------------------------------------------------------
o 这样啊 。 
给你实例代码吧。 最好你自己去找几个项目看看。 
我的 都三层结构的,没有单层实现功能的。 
建议你去www.51aspx.com 找找
------解决方案--------------------------------------------------------
就是设置特性呀,


Module Module1

Sub Main()
' The line below causes the compiler to issue a warning:
' 'App.SomeDeprecatedMethod()' is obsolete: 'Do not call this method.'
SomeDeprecatedMethod()

End Sub
' The method below is marked with the ObsoleteAttribute. 
' Any code that attempts to call this method will get a warning.
<Obsolete("Do not call this method.")> Private Sub SomeDeprecatedMethod()

End Sub
End Module

  相关解决方案