This page contains content or formatting that is not valid. You can find more information in the affected sections

You get this error when you are trying to update a SharePoint webpart tool part or something like that and you click on ‘Publish’ page button. This only happens if you have any Validation Controls on your webpart.

Solution: As you have validation controls on your webpart UI and you are not filling in anything, it is not letting your page to postback and you need to disable rendering the webpart while you are modifying the toolpart. You can do that by writing down code as below in your ‘CreateChildControls method of webpart

 

protected override void CreateChildControls()
{ 

WebPartManager wp = WebPartManager.GetCurrentWebPartManager(this.Page); 
if (wp.DisplayMode == WebPartManager.BrowseDisplayMode)
{
// add your validator control
} 
else
{
// dont add your validator control
}

base.CreateChildControls(); 

}

Thanks & Regards,
Avinash Dad

calendarMarch 13, 2012 · cardInfoyen · commentsNo Comments
tagTags: , ,  · Posted in: MOSS, SharePoint

Leave a Reply

Spam Protection: , required

myworldmaps infoyen