By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

Strange question

P: n/a

I am developing an online book store with shopping cart.
My shopping cart is represented as a Xml server control
and I am using an XSLT to render it at the client side.

I am using an XmlDocument object as session variable to
represent my shopping cart. Initially when the session
starts, I am using the XmlDocument with root and no
elements to show that no items have been added to the

Once user adds a book, I am taking out the XmlDocument
from session which is my shoppingCart and adding a node
to that XmlDocument with book's details and storing back
the document into the session. But the strange thing
which is happening is, it is adding two nodes of the book
to the XmlDocument instead of a single node. I am using
ImportNode to add a single book node to the XmlDocument.

Now here comes another strange situation. Instead of
trying to develop the cart as XmlDocument, this time I
tried developing the shopping cart as a DataTable and
each time user adds a book, I am adding a new row with
the book to the DataTable session object and displaying

Even in this case, surprisingly shopping cart is showing
2 books instead of a single book.

What can be the reason for this strange behavior. Can
anyone help me in pointing out my mistake?

I would truly appreciate it as I have been cracking my
head on it for several days in a row.

Thanks in advance!

Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.