You can use the sender object. You need to cast it first to the DropDownList type so you can access it's PEMs. Here is the sample code:
CType(sender, DropDownList).SelectedItem.Value
>Cathi
>
>Thanks, I was thinking I was going to need to use the sender or e objects in the selected_IndexChanged. The value it returns in the integer value. How do I format my SQL text to address that, if I just hard code the value into the string it works, but trying to use the variable, I get no results.
>
>
> Dim objSQLString As String
> Dim cFilter As String
> cFilter = lnSelectedFunctionType.ToString
> objSQLString = "Select * from ProgramFunctions where FunctionTypeID = '" + cFilter + " '"
> Dim objSQLCommand As New System.Data.SqlClient.SqlCommand(objSQLString, Me.SqlConnection1)
> Dim objDataReader As SqlClient.SqlDataReader
> Me.SqlConnection1.Open()
>
> objDataReader = objSQLCommand.ExecuteReader()
> Me.DataGrid1.DataSource = objDataReader
> Me.DataGrid1.DataBind()
> Me.SqlConnection1.Close()
>
>
>Thanks for your help
>Kirk
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi