Add parameters to Datamapper class

Add parameters to Datamapper class

Old forum URL:

raghu143 posted on Monday, March 29, 2010

Hi i have about 16 controls on my web form among them i have set bind property in aspx page for 12 controls and others are check boxes and fileupload control... I'am just wondering how do i add the other four parameters to Datamapper class externally...

DataMapper.Map(e.Values, obj); .. i have this  e is an event as InsertObjectArgs

RockfordLhotka replied on Tuesday, March 30, 2010

DataMapper is just a helper type, you don't need to use it at all. All DataMapper does is use reflection and other tricks so you write one line of code to copy a bunch of property values instead of writing one line of code for each property value.

I often have code that doesn't use DataMapper at all. Or that uses DataMapper to copy simple properties, along with code to copy a few other properties that are more complex.

Copyright (c) Marimer LLC