Hello,
The Users.aspx page will not run because it's trying to sort on a bound column that does not exist.
Users.aspx code looks something like this (
vb.net):
Code:
...
cgvUsers.AddBoundField("", "Actions", "")
cgvUsers.AddBoundField("DisplayText", "Name", "DisplayText")
cgvUsers.AddBoundField("WindowsAccountName", "Windows Account", "WindowsAccountName")
cgvUsers.AddBoundField("Email", "Email", "Email")
cgvUsers.AddBoundField("", "Active", "IsActive")
cgvUsers.DataBind()
...
The columns come from the ListClassName which is ENTUserAccountEOList (this is pretty cool)
Anyway, ENTUserAccountEOList is a list of ENTUserAccountEO objects. It's looking for a property called 'DisplayText" and I could not find that property. So to get around this issue I created a readonly property called DisplayText that returns the function GetDisplayText:
Code:
Public ReadOnly Property DisplayText() As String
Get
Return GetDisplayText()
End Get
End Property
This does work and The page now renders, however not sure if this is the correct way.
Thanks,
-realkewl
Note:
I could not find ENTUserAccountEOList in chapter 4's source code...so you can just write it using the book