Using Reflection to Assign HttpContent to Class Properties

In my continuing discussion about implementing Multi-part Form AJAX submission I have a need to talk about how I bound the HttpContent to a strongly typed class. One way you could do it is by taking the HttpContent and looping through it and adding them to a class. The problem with this approach is that if you send a form element that you have not create a class property for then you will get an error. The way to prevent this is by taking your class properties and looping through them and find the corresponding item in the HttpContent (Using Reflection). This way if more elements are sent then you would just skip them. Learn More

Tags: , , , , , , , , , , | Posted under ASP .NET 4.0, Programming/Coding | Leave a comment

Creating MODX Manager Menu Items in Code

This article is about adding items to the MODX Manager’s Top Menu in PHP. A MODX menu item is kind of an odd thing. The modMenu object doesn’t have an id field (its primary key is the text field), and it doesn’t have a namespace even though it’s almost always associated with one.

It’s relatively easy to create a menu item in the Manager, where many of the details are handled for you, and you can then export it as part of a transport-package build system with the MyComponent extra. At some point, though, you might need to create a menu item in PHP code. Learn More

Tags: , , , , , , , , , , , , | Posted under MODX, MODX | Leave a comment

Fix the Problem with Gift Certificate Data in TomatoCart


Right before you “click” the Confirm Order button during the Checkout process, the system incorrectly displays the “Sender Name” and “Sender Email”.

However, the Shopping Cart correctly displays the “Sender Name” and “Sender Email” & the data stored in the Orders table confirms what the Shopping Cart displays. Learn More

Tags: , , , , , , , , , | Posted under TomatoCart | Leave a comment