quote:Originally posted by jimibt
there is obviously a reason why you want to go down this route (reflection??) and if that were described, then i think it'd be perhaps easier to address the issue above based on your reasoning.
all the best for now
Thanks for the reply. I do want to use the object for most functions. I ran into a problem where I have form fields on multiple tabs of a ajax tab container and asp.net doesn't see those controls and does not update the data. So I'm building a workaround since my project requires use of tabs with data fields on more than one tab.
I'm writing code in the ItemUpdating event to find the control on the correct tab and copy the values back to the FormUpdateEventArgs e.
oldData = BLL.Aritlces.Article.GetArticleByID(x);
then I loop a hash table that defines my fields and which tabpanel they are on. Then search for the control SelTabPanel.FindControl(), then:
e.OldValues[key] = oldData[key]; // I want to do this instead of oldDate.ColumnName
e.NewValues[key] = txtBox.Text;
I suppose if I could convert oldData to a DataRow or something.
This process does save my data and it works well to monitor changes.
I welcome any ideas. Hope this makes sense.