Hey Guys,
I'm trying to make a simplyfied view for my news. The news i'm trying to show have customfields and it's those fields i can't figure out how to save/update.
Can anyone give me som pointers?
Now i have somthing like this, but that ain't doing much good.
Repeater innerRepeater = ( item.FindControl( "repCustomFields" ) as Repeater );
foreach ( RepeaterItem innerItem in innerRepeater.Items ) {
int customfieldID = int.Parse( ( innerItem.FindControl( "hidID" ) as HiddenField ).Value );
string txtValue = ( innerItem.FindControl( "txtValue" ) as TextBox ).Text;
if ( txtValue.Length > 0 ) {
for ( int i = 0; i < n.CustomFields.Count; i++ ) {
n.CustomFields[ i ].Value = txtValue;
n.CustomFields[ i ].Save();
}
}
}