Q. My web part is performing poorly and takes too much time to render. Is there any way I can monitor my code for performance bottlenecks?
A. Yes, you can do this easily using the
SPMonitoredScope class, which helps you define your own monitored scope and display performance results on the developer dashboard. This is discussed more in Hour 8, “Understanding Client Object Model in SharePoint 2010.”
Q. Is there any way I can specify default values for my web part properties using an XML file?
A. Yes, you can specify default values in the .webpart file, which is an XML file that describes your web part and makes it available in the Web Part Gallery. You can add new properties under the properties tag and specify their values, or you can edit ...