Adding a ListView to a custom Web Part
The ListView Class (Microsoft.SharePoint.WebControls) renders a list by using a specified view.
[code:c#]
ListView listView;
protected override void CreateChildControls()
{
listView = new ListView();
SPList list = SPContext.Current.Web.Lists["MyListName"];
listView.ListId = list.ID.ToString();
listView.ViewId = list.DefaultView.ID.ToString();
Controls.Add(listView);
}
protected override void Render(HtmlTextWriter writer)
{
listView.RenderControl(writer);
}
[/code]
ZoomIt V2.2 for zooming in Technical Presentations
"ZoomIt is screen zoom and annotation tool for technical presentations that include application demonstrations. ZoomIt runs unobtrusively in the tray and activates with customizable hotkeys to zoom in on an area of the screen, move around while zoomed, and draw on the zoomed image. I wrote ZoomIt to fit my specific needs and use it in all my presentations.
ZoomIt works on all versions of Windows and you can use pen input for ZoomIt drawing on tablet PCs."
Download: http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx
Enable Site Usage Summary
To view the site usage summary (Site Settings --> Site Administration --> Site Usage Reports) you have to make some settings in the Shared Service Provider and the Central Administration:
Shared Services Provider:
- Open the Shared Services Administration page
- Click on Usage Reporting under the Usage Reporting section
- Check the Enable advanced usage analysis processing option
- Check the Enable search query logging option
- Click on OK
Central Administration:
- On the SharePoint Central Administration home page, click Operations.
- Select Usage Analysis Processing under the Logging and Reporting section.
- Check the Enable logging option
- Specify the Data hard drive on the Web Server for the log file location. Eg. D:\MOSS\UsageAnalysisLogs
- Set the number of log files to create to 1
- Check Enable usage analysis processing option
- Set the Start and End Time to that specified in the previous section
- Click on OK
Microsoft releases the Open Source CMS Oxite
Microsoft releases the first version of the opensource-cms Oxite. This content management system is based on ASP.NET and the Model View Controller (MVC) Framework. This CMS is primary released for blogs. Since the use of ASP.NET this software requirers windows servers (hosting). "Oxite is an open source, standards compliant, and highly extensible
content management platform that can run anything from blogs to big web
sites."
Download Oxite: http://www.codeplex.com/oxite
Learn More: http://visitmix.com/lab/oxite
RSS Web Part on Publishing Page
During trying to add a standard RSS Web Part on my publishing page I came accross some issues.
1) The RSS WebPart was not visible in the WebPart gallery. This could be solved by enabling the Office Server Enterprise Site Collection Features (if you have an Enterprise license).
2) After adding a RSS-Url in the Web Part properties I got the next error:
3) The SharePoint Log says: "RssWebPart: Exception handed to HandleRuntimeException.HandleException System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable host". Since I use this WebPart on a server containing a Proxy, I modified the web.config.
<system.net>
<defaultProxy>
<proxy autoDetect="true" proxyaddress="http://YOURPROXYSERVER" bypassonlocal="true" />
</defaultProxy>
</system.net>
[/code]
4) After modifying the web.config I got the next error (this looks like trial on error).
The SharePoint log says: "RssWebPart: Exception handed to HandleRuntimeException.HandleException System.Net.WebException: The remote server returned an error: (400) Bad Request. at Microsoft.SharePoint.WebControls.BaseXmlDataSource.GetXmlDocument() at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetHierarchicalDocument(IHierarchicalDataSource ds) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetHierarchicalXPathNavigator(IHierarchicalDataSource ds) at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal() at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator() at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator(IDataSource datasource, Boolean originalData) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathN..."
One of the scenarios when "400 Bad Request" is returned is if the value of the content-length header is smaller then the actual length of the message body.
Note: After adding a Page Viewer Web Part and setting the url to the RSS url I get the xml back...
5) After changing the proxy "again" in the web.config it works fine
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="false" proxyaddress="http://yourserver:yourport" bypassonlocal="false" />
</defaultProxy>
</system.net>
6) The result:
Nick in Giraffe News after publication in SDN Magazine 99
Source: http://www.giraffe.nl/
Using SharePoint Designer for adding the Data Form Web Part
The Data Form Web Part (in SharePoint 2003 called the Data View Web Part) is probably the most used functionality in SharePoint Designer. Using the Data Form Web Part, you are able to use multiple data sources, including data coming from external data sources. This functionality is added without programming
1. Open your Site in SharePoint Designer 2007 and open a Web Part Page where you want to insert the Data Form Web Part.
2. Insert Data View from the Data View menu in SharePoint Designer.
3. The Data Form Web Part is added to the page.
4. The next step is selecting a datasource for creating a Data View. You can use an excisting Data View or create a new one.
5. Select a datasource and select show data from the dropdown.
6. The Data Source Details panel containing the fields is opened. You can choose the fields you want to show from here. In the dropdown you can choose how you want to insert your selected fields. I choose Single Item View.
7. The data will be shown in the Data Form Web Part.
8. Note: Take a look at the inserted source code (XSL).
Best way to discover the power of this Web Part is play around with the options and some configurations of this Web Part.
You can read more about this topic on the Microsoft Office Site.