I have a working webpage with file upload to and download from a SQL Server database table but now I have a new requirement to group the files  so I want to add a new column.
Here is the relevant snippet of code (the last line that's bolded, underlined, and italicized):
cmd.CommandText = "select Name, Data, ContentType, IsItPrivate, Related from tblFiles where Id=@Id and IsItPrivate=1 order by Related, Name" cmd.Parameters.AddWithValue("@Id", id) cmd.Parameters.AddWithValue("@IsItPrivate", IsItPrivate) ' cmd.Parameters.AddWithValue("@Related", Related) = TryCast(FindControl("DropDownList1"), DropDownList).SelectedIndex I am trying to set the new database column named "Related" equal to the selected index of a drop down .  
I'll include the whole c ...

Go to the complete details ...