Skip to content


Is SocialThing.com the big hit out of SXSW?

ReadWriteWeb is trying to predict what app will be the big hit at SXSW, and they seem to have concluded that whatever it is, it will involve social networking.  RWW seem impressed with SocialThing, and predict that if they get their iPhone interface working by SXSW then thy’ve got a real chance at being a huge hit this year.  The idea behind the app is to allow you and your friends to keep tabs on what one-another is doing via different services available for life streaming.  From their website:

Get your digital life in order

socialthing! is a digital life manager that puts what you do online into one place. See everything that’s going on with your friends in all the sites you use, post stuff to multiple places at once and more!

Here are some photos from their flickr account:

Socialthing! Adds Pownce

 

And their iPhone interface:

Socialthing! Mobile - Home

Socialthing! iPhone Edition

Socialthing! Mobile - Post Status

Posted in Website Development.


Check out my Pownce Feed

I’ve place a badge on my home page that displays my two latest Pownce posts, and dedicated an entire page Pownce Feeds that lists my 30 most recent Pownce posts.  Things that ramble off my brain that don’t deserve a full blog post will get Pownced.

Posted in Website Development.


Format DateTime to Short Date when Binding in ASP.Net

Here’s how to format a DateTime value to a Short Date when Binding in ASP.Net:

<%# Eval(“StartDate”, “{0:d}”) %>

Posted in Website Development.


How to style a table for Sharepoint

The Sharepoint GridView is not as fancy as the ASP.Net Listview, therefore it’s better to use an ASP.Net Listview to display a data table and style the table with the Sharepoint style classes.  Here are my notes on how to style a data table for Sharepoint:

 

Table

Table Style: border-style:None;width:100%;border-collapse:collapse;

Table Class: ms-listviewtable

Header Row Class: ms-viewheadertr

Header TH: ms-vh2-nofilter ms-vh2-gridview

Item TD: ms-vb2

 

Data Paging

The TD surrounding the DataPager: ms-listheaderlabel

Data Pager:

<asp:DataPager ID="DataPager1" runat="server" PageSize="10">

<Fields>

<asp:NextPreviousPagerField ButtonType="Image" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageImageUrl="/_layouts/1033/images/prev.gif" LastPageImageUrl="/_layouts/1033/images/prev.gif" NextPageImageUrl="/_layouts/1033/images/prev.gif" PreviousPageImageUrl="/_layouts/1033/images/prev.gif" />

<asp:NumericPagerField />

<asp:NextPreviousPagerField ButtonType="Image" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageImageUrl="/_layouts/1033/images/next.gif" LastPageImageUrl="/_layouts/1033/images/next.gif" NextPageImageUrl="/_layouts/1033/images/next.gif" PreviousPageImageUrl="/_layouts/1033/images/next.gif" />

</Fields>

</asp:DataPager>

Posted in Website Development.


How To Dynamically Set a LinqDataSource to filter the results based on user input

Here’s an example of how to dynamically set the where property on a LinqDataSource to filter data based on user input from a textbox.  In this case we have a Linq entity called ContractsEntity that has a table called ContractHeaders.  Not shown in this example is the listview (in the Ajax UpdatePanel) that is bound to the LinqDataSource.  The listview will show all contracts by default, but I want the user to be able to enter text to filter the results.  The user enters data in the textbox and clicks on the Search button.  This causes the UpdatePanel to send an Ajax request which fires off the SearchContractNumButton_Click event.  In the event I set the LinqDataSource Where property to do the filtering.

The ASP.Net source looks like this:

<form id=”form1″ runat=”server”>

<div>

<asp:LinqDataSource ID=”ContractHeadersLinqDataSource” runat=”server”

ContextTypeName=”ContractsEntity” TableName=”ContractHeaders”>

</asp:LinqDataSource>

<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>

</asp:ScriptManager>

<asp:UpdatePanel ID=”UpdatePanel1″ runat=”server”>

<ContentTemplate>

<div>

<p>Enter a contract to search for:</p>

<p>Contract # <asp:TextBox ID=”SearchContractNumTextBox” runat=”server”></asp:TextBox>

<asp:Button ID=”SearchContractNumButton” runat=”server”

onclick=”SearchContractNumButton_Click” Text=”Search” />

</p>

</div>

</ContentTemplate>

</asp:UpdatePanel>

</div>

</form>

In the code behind the Button’s OnClick event looks like this:

protected void SearchContractNumButton_Click(object sender, EventArgs e)

{

ContractHeadersLinqDataSource.Where = “ContractNum.Contains(\”" + SearchContractNumTextBox.Text + “\”)”;

}

After further testing I have determined that this is not the best way of doing things, it stops working with paging.  Once I have figured out a better way of doing this I’ll post it.

A better way of doing this requires absolutely no code!  Configure your LinqDataSource in design view and click Next in the Choose a Context Object window.  Click on the Where button to configure the Where.  Make sure Automatically generate the Where Expression… checkbox is not checked.  In the Where Expression text area enter

ContractNum.Contains(@ContractNum)

Click on the Add Parameter button to add the Parameter.  In Parameter Source choose Control.  In ControlID choose SearchContractNumTextBox.  Click on the Show advanced properties link to show advanced properties.  Change ConvertEmptyStringToNull to False (Missing this step will cause an error on the page).  Change Name to ContractNum.  See the screenshot below.  Click OK and Finish.  Your filtering should be all set to go!

LinqDataSource Filter On User Input

Posted in Website Development.


Installing ASP.NET 2.0 AJAX Extensions 1.0 in Windows SharePoint Services Version 3.0

This is a great walk through on how to install ASP.Net 2.0 Ajax Extensions in Sharepoint so you can write and use Ajax-enable applications within sharepoint.  Use this in conjunction with Microsoft .Net 3.5 applications and you can get some nice apps written quickly using LinqDataSource, Listviews, and ASP.Net Ajax.  A tutorial is coming soon.

 

There is a note in the installer:

Note that the procedure described below applies to .NET Framework 2.0. If you are using .NET Framework 3.5, change the version number in each of the XML snippets from Version=1.0.61025.0 to Version=3.5.0.0.

 

I followed the directions and replaced all 1.0.61025 to 3.5.0.0 and had no problem with WSS 3.0 SP1.

 

Installing ASP.NET 2.0 AJAX Extensions 1.0 in Windows SharePoint Services Version 3.0

Posted in Website Development.


Where are the Sharepoint Logs?

When debugging an application I’m writing in Sharepoint I’m always trying to find the Sharepoint logs, so I posted this for me to remember.  The logs are located here: 

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS

Posted in Website Development.


How to install a Sharepoint application template

  1. Remote Desktop into WebServer1.
  2. Download the .exe file from the internet and save it to c:\Documents and Settings\[USERNAME]\My Documents\Application Templates.
  3. Create a new folder in the Application Templates folder with the name of the new application template to be installed (i.e. Knowledge Base).
  4. Run the .exe file, which is a self-extracting zip file and choose the newly created folder (Knowledge Base) to extract the files to.
  5. Open up a command prompt and change into the folder (c:\Documents and Settings\[USERNAME]\My Documents\Application Templates\Knowledge Base)
  6. Enter the following command:  "c:\program files\common files\Microsoft Shared\Web Server Extensions\12\bin\stsadm" -o addsolution -filenamename APPLICATIONTEMPLATENAME.wsp
  7. You should see "Operation completed successfully"
  8. Enter the following command:  "c:\program files\common files\Microsoft Shared\Web Server Extensions\12\bin\stsadm" -o deploysolution -name APPLICATIONTEMPLATENAME.wsp -allowgacdeployment -immediate
  9. You should see "Timer job successfully created."

Posted in Website Development.


Individual Windows Live Installers

If you’re having trouble installing any Windows Live applications using the Windows Live Installer, you can browse to this Windows Live SkyDrive folder and download the individual installers themselves.  You won’t get all of the functionality (There is no shortcut to Windows Live Writer for me, but I can get to it through Internet Explorer).

Posted in Website Development.


Using ASP.Net 3.5 controls in Windows Sharepoint Services

Make sure you have the Microsoft .Net 3.5 Framework installed on your servers, and place the following in each Web Application’s web.config file under configuration/system.web/pages:

<controls>

<add tagPrefix=”asp” namespace=”System.Web.UI.WebControls” assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″ />

</controls>

The web.config files are generally found here:  C:\Inetpub\wwwroot\wss\VirtualDirectories\[PORT NUMBER].  If the controls tag is already present in the pages tag, then put the <add tagPrefix… tag in the existing controls tag.

Posted in Website Development.