An example of an ASP.NET app I wrote

I have been working for a number of years using various Microsoft technologies. One if ASP.NET, using what’s known as Web Forms. I decided, some years ago, to write a simple video management system, for our videos. If I were starting today, I might not write such an app, given such services like Ultraviolet, Flixster, VUDU, Netflix, etc., but still I like to have something to, well play around with and try out different ideas. So here’s the search page I wrote, for searching my database. This is the ASP.NET code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    search media library</h2>
    <asp:SqlDataSource ID="sdsTypeOfShow" runat="server" 
        ConnectionString="<%$ ConnectionStrings:VideoLibraryConnectionString %>" 
        SelectCommand="SELECT * FROM TypeOfShow ORDER BY ShowName">
    <asp:SqlDataSource ID="sdsImage" runat="server" 
        ConnectionString="<%$ ConnectionStrings:VideoLibraryConnectionString %>" 
        SelectCommand="SELECT DISTINCT ImageForShow FROM TypeOfShow WHERE (ShowCode = @ShowCode)" 
            <asp:ControlParameter ControlID="ddlTypeOfShow" Name="ShowCode" 
                PropertyName="SelectedValue" Type="Int32" />
    Category to Search:
    <asp:DropDownList ID="ddlTypeOfShow" runat="server" 
        DataSourceID="sdsTypeOfShow" DataTextField="ShowName" 
        DataValueField="ShowCode" AutoPostBack="True" 
    <asp:Repeater ID="repImage" runat="server" DataSourceID="sdsImage">
            <asp:Image ImageUrl='<%# Eval("ImageForShow", "~/Images/{0}") %>' runat="server" CssClass="RightJustify" />
    (Enter at least one of the following)</h3>
    Episode name (a portion may be specified):
    <asp:TextBox ID="txtEpisodeName" runat="server" MaxLength="50" Width="394px"></asp:TextBox>
    <br />
    Synopsis (a portion may be specified):
    <asp:TextBox ID="txtSynopsis" runat="server" Width="425px"></asp:TextBox>
        <asp:SqlDataSource ID="sdsEpisodes" runat="server" 
            ConnectionString="<%$ ConnectionStrings:VideoLibraryConnectionString %>" 
            SelectCommand="spEpisodesByShowCodeAndName" SelectCommandType="StoredProcedure">
                <asp:ControlParameter ControlID="ddlTypeOfShow" DefaultValue="4" 
                    Name="ShowCode" PropertyName="SelectedValue" Type="Int16" />
                <asp:ControlParameter ControlID="txtEpisodeName" DefaultValue="" 
                    Name="EpisodeName" PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtSynopsis" Name="Synopsis" 
                    PropertyName="Text" Type="String" />
        <asp:GridView ID="grdEpisodes" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
            BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            DataKeyNames="ShowID" DataSourceID="sdsEpisodes" GridLines="Horizontal">
            <AlternatingRowStyle BackColor="#F7F7F7" />
                <asp:HyperLinkField DataNavigateUrlFields="ShowCode,ShowID" 
                    HeaderText="Click to View" Text="View">
                <ItemStyle HorizontalAlign="Center" />
                <asp:BoundField DataField="EpisodeName" HeaderText="Episode" 
                    SortExpression="EpisodeName" />
                <asp:BoundField DataField="PlayTime" HeaderText="Play Time" 
                    SortExpression="PlayTime" />
                <asp:BoundField DataField="ShowCode" HeaderText="ShowCode" 
                    SortExpression="ShowCode" Visible="False" />
                <asp:BoundField DataField="Synopsis" HeaderText="Synopsis" 
                    SortExpression="Synopsis" />
                <asp:BoundField DataField="DateLastViewed" DataFormatString="{0:d}" 
                    HeaderText="Last Viewed" SortExpression="DateLastViewed" />
                <asp:BoundField DataField="ShowID" HeaderText="ShowID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ShowID" Visible="False" />
                <asp:BoundField DataField="Rating" DataFormatString="{0:F3}" 
                    HeaderText="Our Rating" NullDisplayText="(Not yet rated)" 
                <ItemStyle HorizontalAlign="Center" />
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <SortedAscendingCellStyle BackColor="#F4F4FD" />
            <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
            <SortedDescendingCellStyle BackColor="#D8D8F0" />
            <SortedDescendingHeaderStyle BackColor="#3E3277" />
        <br />
    <asp:Button ID="btnSearch" runat="server" CommandName="Search" Text="Search" 
        ToolTip="Perform search" />
    <asp:Button ID="btnReset" runat="server" CommandName="Reset" Text="Reset" />

The bulk of the work is all done in the ASP.NET code, but for completeness sake, here’s the C# code behind file:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Search : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)

        protected void ddlTypeOfShow_SelectedIndexChanged(object sender, EventArgs e)

        protected void sdsImage_Selected(object sender, SqlDataSourceStatusEventArgs e)

.csharpcode, .csharpcode pre
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
background-color: #f4f4f4;
width: 100%;
margin: 0em;
.csharpcode .lnum { color: #606060; }

Looks like Verizon isn’t going to upgrade HTC Trophy’s to 7.8

I’ve been using my HTC Trophy, from Verizon, for almost 2 years. It started out as Windows Phone 7, then was upgraded to Windows Phone 7.5. When word came out that Microsoft was working on a Windows Phone 8, but would upgrade WP 7.5 to 7.8, to give us some of the features of WP 8 (like more customization of the tiles on the Start screen), I was pretty excited. I waited. Weeks turned into months, with nothing happening. Finally, today I came across a link from WP Central’s website, saying that Verizon had done an “end of life” to several phones, back in January 2013, and the humble HTC Trophy was one of those axed.

Oh well, no love for the old HTC Trophy.

Ode to Merle, who passed away on 8/15/2011

It’s hard to believe that its almost a year now when a very close friend of mine, Merle Snider, of Albuquerque, NM, passed away on August 15, 2011.  He was born on April 2, 1937 (I only know this by his obituary on  He and I worked together at the NM Department of Health’s Scientific Laboratory Division, and then later at UNM’s Albuquerque Metro Central Intake, where he left in May 201, fully hoping to return.  No one knew that he would never return.

I learned a lot from him.  He had worked for IBM as a programmer several years ago (I really don’t know when, because that was before I knew him), in the Government Services division.  (I don’t know if IBM still has such a division or not, but that’s what he called it when he talked to me about it.)  He was very meticulous about design and programming, careful to get things right.  I learned of good books, magazines, quality antique cars and which brands of Scotch he liked.  Much to my chagrin, I’ve found that I have absolutely no photos of Merle, which really irritates me a lot.  If anyone who reads this blog post, has a photo of Merle, please share it with me.

Merle my friend, I miss you tremendously.  You touched my life in many positive ways.