Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the selected data value from the drop down list
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00714584
Message ID:
00714588
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform