Exception on Sumbit/Approve and Commit
Hi Kethari,
here are some remarks:
1) never(!) use DataSource.RawContent. This is highly not recommended and
relies on the internal datastructures in a specific version of the product.
Any ServicePack or hotfix might break your functionality!
You should recode your code to the correct and recommended syntax:
your coding:
oldDefaultPosting.Placeholders["htmlHeader"].Datasource.RawContent =
oldDefaultPosting.Placeholders["htmlContent"].Datasource.RawContent;
correct coding:
HtmlPlaceholder htmlHeader = (HtmlPlaceholder)
oldDefaultPosting.Placeholders["htmlHeader"];
htmlHeader.Html = oldDefaultPosting.Placeholders;
or in short:
((HtmlPlaceholder) (oldDefaultPosting.Placeholders["htmlHeader"])).Html =
oldDefaultPosting.Placeholders;
2) you are using an existing AppContext in this routine. It is not possible
to see what happend previously. You should create and disponse the
AppContext in the same event handler if you are using an ASP.NET
application. Or do ALL users use the same AppContext? This would also cause
the error you have seen with multi-object commit due to the fact that
different users might work in parallel.
Regards,
Stefan.
|