Monday, September 21, 2009

Seperate DisplayMode Controls from EditMode Controls in a SharePoint field control

Its not very uncommon to have a field control separate display mode controls from edit mode controls. The approach I follow is to seperate them in CreateChildcontrols()

if (this.ControlMode == SPControlMode.Edit || this.ControlMode == SPControlMode.New)
//Code for adding Edit Mode Controls here
//Code for adding Display Mode Controls here

No comments:

Post a Comment