The 'SkinId' property can only be set in or before the Page_PreInit event for static controls

If you get that error , then you would probably is trying to set the SkingId programatically.Note that if you are adding your control dynamically, you should assing that proeprty before adding the control to it's parent.I noticed this issue also when the developers trying to set the skinId for the controls that are inside another controls like GridView,Datalist,Repeater,ListView ....

For those control , you must handle the RowCreated event and set the Child Control SkinId there, It will not work if you tried to set the SkinId in a lter stage like RowDataBound or ItemDataBound.

No Comments