是否可以传递一个属性,例如。Person.Firstname 通过引用一个函数然后仍然能够通过这个引用类型读取 Person.Firstname 的属性?
那么引用类型是否知道它不仅是一个字符串,还是类 Person 的 Firstname 属性?
蒂亚
我尝试为我的 asp.net mvc 应用程序编写一个扩展,该应用程序使用 jquery.autotab 并将必要的 js 代码添加到基于属性的 Html.TextBox 输出中。
例如
Class Person
<Autotab("text", maxlength:= 15)> _
Property Firstname() as String
...
End Property
End Class
<%= Html.TextBoxAutoTab("Person.Firstname", p.Firstname) %>
TextBoxAutoTab 的签名看起来像这样
Public Function TextBoxAutoTab(ByVal h As HtmlHelper, ByVal name As String, ByRef value As Object) As String