Sharepoint faqs

Published on December 2019 | Categories: Documents | Downloads: 16 | Comments: 0 | Views: 257
of 9
Download PDF   Embed   Report

Comments

Content

1) What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from? There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the SharePoint WebPart Base class or the ASP.NET 2.0 WebPart base class. When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint; however there are four exceptions when it is better to leverage functionality from the SharePoint WebPart base class: Cross page connections Connections between Web Parts that are outside of a Web Part zone Client-side connections (Web Part Page Services Component) Data caching infrastructure

2) What are the differences between the two base classes and what are the inherit benefits of using one over another? The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported: Cross page connections Connections between Web Parts that are outside of a Web Part zone Client-side connections (Web Part Page Services Component) Data caching infrastructure ASP.NET 2.0 Web Parts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to use Class Resources for deployment of said types.

3) What is the GAC? The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.

4) What is strong naming (signing) a WebPart assembly files mean? Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server.

5) What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?

Did you know?

Scribd is more than just documents. Our digital library gives you access to books, audiobooks, and more. Learn more  Did you know?

With Scribd you can unlock unlimited possibilities with over 1,000,000 audiobooks and ebooks. Learn more 

Did you know?

Scribd is more than just documents. Our digital library gives you access to books, audiobooks, and more. Learn more 

When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within

In the generic safe control entry (this is general, there could be more), there is generally the Assembly

6) What is the CreateChildControls () method? How can you use it to do something simple like displaying a Label control? The CreateChildControls method in Web Parts is used to notify the WebPart that there are children controls

In order to create something like a label control in Create, you would create a new label control using the

7) What does the Render Contents method do in an ASP.NET 2.0 WebPart? The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since

*** Side Question: I got asked what the difference between CreateChildControls and the Render Contents method. The CreateChildControls method is used to add controls to the WebPart, and the Render

8) What is the WebPartManager sealed class? What is its purpose? The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page,

*** Side Question: I got asked how many WebPartManager controls should be on a page. In order to have Web Parts on a page there has to be just one WebPartManager control to manage all the Web Parts on the page. 9) What is a SPSite and SPWeb object, and what is the difference between each of the objects? The SPSite object represents a collection of sites (site collection [a top level site and all its sub sites]). The

10) How would you go about getting a reference to a site? Select For Unformatted Code C#:

Did you know?

With Scribd you can unlock unlimited possibilities with over 1,000,000 audiobooks and ebooks. Learn more 

Did you know?

Scribd is more than just documents. Our digital library gives you access to books, audiobooks, and more. Learn more 

3.

oSPWeb = oSPSite.OpenWeb();

11) What does a SPWebApplication object represent? The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual

12) Would you use SPWebApplication to get information like the SMTP address of the SharePoint site? Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the

Side Question: I got asked if there are other ways to send emails from SharePoint. The answer is yes, there is. You can use the Send Mail method from the SPutility class to send simple emails, however it is not

13) How do you connect (reference) to a SharePoint list, and how do you insert a new List Item? Select For Unformatted Code C#:

1.

2.

3.

4.

using(SPSite mySite = n ew SPSite("yourserver")) { using(SPWeb myWeb = mySite.OpenWeb ()) {

5.

SPList interviewList = myWeb.Lists["listtoinsert"];

6.

SPListItem newItem = interviewList.Items.Add();

8.

newItem["interview"] = " in ter view" ;

7.

9. newItem.Update(); 10. } 11. }

14) How would you loop using SPList through all Share Pont List items, assuming you know the

Select For Unformatted Code C#:

1.

SPList interviewList = myWeb.Lists["listtoiterate" ];

2.

foreach (SPListItem interview in in ter viewL is t) { // Do Something

3. 4.

5.

}

15) How do you return SharePoint List items using SharePoint web services? In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx

Did you know?

With Scribd you can unlock unlimited possibilities with over 1,000,000 audiobooks and ebooks. Learn more 

Did you know?

Scribd is more than just documents. Our digital library gives you access to books, audiobooks, and more. Learn more 

the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc. Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with

16) When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items? In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and

*** Side Question: I got asked when you should state the credentials in code. You must state the credentials you are going to pass to the web service before you call any of the methods of the web service, otherwise the call will fail. 17) What is CAML, and why would you use it? CAML stands for Collaborative Application Markup Language. CAML is an XML based language which

18) What is impersonation, and when would you use impersonation? Impersonation can basically provide the functionality of executing something in the context of a different

19) What is the IDesignTimeHtmlProvider interface, and when can you use it in WebParts? The IDesignTimeHtmlProvider interface uses the function GetDesignTimeHtml() which can contain your

20) What are WebPart properties, and what are some of the attributes you see when declaring WebPart properties in code? WebPart properties are just like ASP.NET control properties, they are used to interact with and specify

21) Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have? Properties are important because WebParts allow levels of personalization for each user. WebPart

Each custom property that you have must have the appropriate get and set accessor methods.

Did you know?

With Scribd you can unlock unlimited possibilities with over 1,000,000 audiobooks and ebooks. Learn more 

Did you know?

Scribd is more than just documents. Our digital library gives you access to books, audiobooks, and more. Learn more  Did you know?

With Scribd you can unlock unlimited possibilities with over 1,000,000 audiobooks and ebooks. Learn more 

43) What base class do custom Field Controls inherit from? This varies. Generally, custom field controls inherit from the

44) What is a SharePoint site definition? What is ghosted (uncustomized) and unghosted (customized)? SharePoint site definitions are the core set of functionality from which SharePoint site are built from,

45) How does one deploy new SharePoint site definitions so that they are made aware to the SharePoint system? The best way to deploy site definitions in the SharePoint 2007 framework is to use a SharePoint solution file, so that the new site definition is automatically populated to all WFE’s in the SharePoint farm.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close