Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 3rd, 2009, 11:17 AM
Authorized User
 
Join Date: Mar 2009
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default Users.aspx chapter 4 will not run because...

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

Last edited by realkewl; April 3rd, 2009 at 11:20 AM.
  #2 (permalink)  
Old April 4th, 2009, 12:10 AM
Authorized User
 
Join Date: Apr 2009
Posts: 41
Thanks: 1
Thanked 2 Times in 2 Posts
Default

The DisplayText property is defined in ETBaseBO as a read-only property that calls the GetDisplayText() abstract method. It's up to the inheriting class to implement GetDisplayText(). See Page 50.

For ENTUserAccountEO's implementation, see page 66.

ENTUserAccountEOList is in the ENTUserAccountEO.cs file. The author puts the object and object list classes in the same file to reduce the total file count and make things easier to manage (page 66, as well).

Hope this helps :)

Tim
  #3 (permalink)  
Old April 7th, 2009, 09:22 AM
Authorized User
 
Join Date: Mar 2009
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Tim,

Thank you!! You are correct. I had a typo in my property name (can you believe that) it said DisplayTest instead of DisplayText. Thanks so much...

-realkewl
  #4 (permalink)  
Old April 9th, 2009, 01:54 AM
Authorized User
 
Join Date: Apr 2009
Posts: 41
Thanks: 1
Thanked 2 Times in 2 Posts
Default

realkewl -

You're welcome. I know all about typos....I keep waiting for an IDE that will input what I meant to type, rather than what I actually typed. It would save me a lot of headaches :)

Tim
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to run Chapter 2 Example tkachuk BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 6 August 2nd, 2009 11:37 PM
A caution for users at Chapter 5, Ex. 03 Prism BOOK: Ivor Horton's Beginning Visual C++ 2005 1 April 14th, 2008 02:32 AM
ModuleConfig Users and Authentication Chapter 5 seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 0 July 5th, 2004 10:49 AM



All times are GMT -4. The time now is 03:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.