asp .net url variable select dropdown list

You would think it would be easy fro a Novice programmer to pre-select a dropdownlist with C# in ASP .Net from a url variable.

Well after an hour of fumbling around I was able to do it.

Page Code:

    
            Customer Assistance
            Client Assistance
            Aquisition and Sales
            Investor Relations
            Business Development

        

Page onLoad Code:

       string Department = Request.QueryString["dep"];
            if (!IsPostBack)
            {
                try
                {
                    txtDepartment.Items.FindByValue(Department).Selected = true;
                }
                catch
                {
                    txtDepartment.Items.FindByValue("custlistitemomerservice").Selected = true;
                }
            }

Example URL Request:

contact.aspx?dep=b2b