Home Contact RSS

Archive for June, 2008

Using DataPager with Code-Behind Data Source

Some of you might have already realized that DataPager does its job only if you use a DataSource control. For instance, if you want to set a ListView’s DataSource property in page’s Load event and expect DataPager control to successfully page the ListView control, it means that you will need to spend your hours to find why it does not work.

Even though I still can’t figure out why it does not work, here is the workaround. Just create a DataSource control (e.g.: LinqDataSource) control just with “ID” and “runat” properties and then hook the “Selecting” event. Also set the ListView’s “DataSourceID” property to the ID of the DataSource control. What you will do there is to set the “Result” property of the SelectEventArgs argument.

<asp:LinqDataSource ID="LinqDataSource1" runat="server" OnSelecting="LinqDataSource1_Selecting">
</asp:LinqDataSource>  

 

protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
e.Result = GetDataSource(); // Assuming that GetDataSource method returns the datasource.
}  

Now you can save your hours.

SharePoint Developer Introduction for .NET Developers launched

The new material is designed to help .NET Developers to learn the top ten artifacts in SharePoint that are interesting to them. Microsoft has created a variety of materials with different learning styles to make getting started with these artifacts easy and it’s all based on the Visual Studio extensions for SharePoint – planned to release v1.2 for Visual Studio 2008 this week also (watch for their announce).

The Top Ten SharePoint Artifacts of interest to .NET Developers being promoted
• Web Parts
• Data Lists
• Event Handlers
• Workflows
• Silverlight Web Parts
• Page Navigation
• Page Branding
• Web Services
• Content Types
• User Management

At the site (which is hosted on microsoft.com) they have:
• An Introductory Whitepaper
• Benefits of SharePoint for Developers
• A Small Public VPC
• Hosted MSDN Virtual Labs in C# and VB.NET
• Video Interview with SharePoint MVPs
• Screencasts
• Web Casts with SharePoint MVPs (incredible 1705 live attendees in just the first four WebCasts)
• Quickstarts
• Labcasts
• Presentation Download
• Hands on Labs Download
• Additional Resource Links

The site encourages developers who use the content to also take a next step and go on Instructor Led Training, Get Certified, and Download an evaluation copy of Microsoft Office SharePoint Server.

http://MSSharePointDeveloper.com