Monthly Archives: February 2010

Securing custom application pages in _layouts directory

I had a need to be able to only allow site collection admins to see some custom pages I had deployed into the _layouts directory. Create a custom code behind class for your aspx that inherits from LayoutsPageBase. Next, override

Posted in Uncategorized

Disable Web Part button after clicking

Not sure how, I got to the end point of this so there may be other ways of doing it. Basically I had a web part the when the button was clicked I needed to disable it. Adding .Attributes[“onclick”] didn’t

Posted in Uncategorized

Validation Group with SharePoint DateTimeControl

The SharePoint DateTimeControl has a property called IsRequiredField, which will act like a RequiredFieldValidator for the control. The problem is when working with web parts in SharePoint calling Page.Validate in your web part can have unexpected results. It often ends

Posted in Uncategorized