General Purpose Data Synchronization Between Objects – The Easy Way

  When moving messages between systems, I’ve often found myself confronted with the need to copy values from one object representation to another.  The objects may or may not have any Properties whose names and Types match, so the solution to this problem must be tolerant of incongruent data shapes.  This can always be achievedContinue reading “General Purpose Data Synchronization Between Objects – The Easy Way”

Use the ASP.NET ViewState with WebUserControls’ public Properties

  This technique works with WebForms, but becomes much more useful when you site WebUserControls on a WebForm and need to set/get values between the parent Form and a child UserControl.   Put something like this in your WebUserCotrol1.   public int Total {         get { return ViewState["intTotal"] != null ? Int32.Parse(ViewState["intTotal"].ToString()) : 0;Continue reading “Use the ASP.NET ViewState with WebUserControls’ public Properties”