Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2007, 04:01 AM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ShoppingCart: SerializeAs XML

Hi,

I'm trying to make Shoppingcart serializable as XML instead of Binary. Just for knowledge. I tryed to implement a class from Icollection this way:

Sorry (VB Code)
Public Class ShoppingCartItemCollection
        Implements ICollection
        Dim _temparray() As ShoppingCartItem

        Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo
            Throw New ApplicationException("Method not implmented yet")
        End Sub

        Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count
            Get
                Return _temparray.Length
            End Get
        End Property

        Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized
            Get
                Return False
            End Get
        End Property

        Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot
            Get
                Return Me
            End Get
        End Property

        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            _temparray.GetEnumerator()
        End Function
    End Class


Then I tried set Items property:
Public ReadOnly Property Items() As ShoppingCartItemCollection
    Get
       Return _items.Values
    End Get
End Property

But Values and ShoppingCartItemCollection are not compatible. Also, I'm not sure if i'm focusing well.
Some kind of help will be appreciated.

Thnx
 
Old October 2nd, 2007, 03:04 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

watxu - without checking on the code, i can only suggest looking at the rss code in tbh. i'll look further tomorrow and hopefuly come back a bit more positive!! :)

jimi

http://www.originaltalent.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
ShoppingCart is not a member of ProfileCommon sstuber BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 May 21st, 2008 04:55 PM
ShoppingCart.aspx.cs - System.FormatException ??? kalel_4444 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 16th, 2008 01:00 AM
how to use shoppingcart without profile? hertendreef ASP.NET 2.0 Basics 6 January 11th, 2007 05:16 AM
ShoppingCart problem collie VB.NET 2002/2003 Basics 0 September 8th, 2004 07:58 AM
Err in ShoppingCart.aspx Blueman137 ASP.NET 1.0 and 1.1 Basics 0 March 19th, 2004 09:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.