Programming

DataFormatString not working with date format in GridView

I set the DataFormatString to {0:d} and also tried {0:MM-dd-yyyy} as several forums and articles suggested; but it still wouldn’t work and kept on displaying the entire string including the time. It turns out, all I had to do is add HtmlEncode=”false”. <asp:GridView ID=”gridItems” runat=”server” AutoGenerateColumns=”False” DataKeyNames=”ItemId” DataSourceID=”MyItemsDataSource” Width=”100%”> <Columns> <asp:BoundField DataField=”Title” HeaderText=”Title” SortExpression=”Title” />(…)

Getting Flash Video (FLV) to work in IIS

Getting Flash Video (FLV) to work in IIS

I added a macromedia flash animation (swf) to my asp.net website and it would work fine but when it came to display video it would stop. I figured it had to do with the video files i.e. the FLV file. It turns out that I had to add its MIME type to IIS Right-click your(…)

Highlight syntax in your HTML blog posts

Check out this site which lets you create HTML formatted with syntax highlighting for your code snippets. Very helpful when posting to your blog or creating HTML versions of your code. It supports all kind of languages, xml, php, c#, vb.net, css, html and others – even XAML. The site is http://FormatMyCode.com

Flip a SQL table around

I have a sql table that looks like this Id Name Value 1 First name Bob 1 Last name Johns 2 First name John 2 Last name Smith 3 First name Bill 3 Last name Gates I want to return the data like this: Id First name Last name 1 Bob Johns 2 John Smith(…)

My First Windows Vista Sidebar Gadget

My First Windows Vista Sidebar Gadget

Here is a Google Search gadget for windows vista that displays the results in a flyout window instead of opening a browser window. I also posted it on the windows live gallery but it hasn’t been published yet. Here is the file: Google Search Gadget