Wizard Control, & Findcontrol

Stephen Paden

New member
Joined
Nov 14, 2011
Messages
3
Location
West Lafayette, Indiana, United States
Programming Experience
1-3
Hi folks,

I am trying to access a dropdownlist inside of a Wizard Control. How do I pass the value from the dropdownlist to the gridview? I am trying the normal method here:

  Protected Sub AddCourseView() 
       Dim objConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("xxxxxxxxx").ConnectionString)
        objConn.Open()
        Dim objComm As SqlCommand = New SqlCommand()
        objComm.Connection = objConn
        objComm.CommandType = CommandType.StoredProcedure
        objComm.CommandText = "DL_AddCourse_View"
        'pull the index number from the dropdown list
        'queried in the stored procedure [dbo].[DL_AddCourse_View]
        objComm.Parameters.AddWithValue("@course_type_id", ddlType.SelectedValue)
        'Execute anything that is a non-query(stored procedure)
        objComm.ExecuteNonQuery()
        'close the database connection
        objConn.Close()
    End Sub


But while they rest inside of the Wizard, that value cannot be passed. Any ideas? I have tried using the standard
ByVal sender As Object, ByVal e As System.EventArgs
and but that doesn't work either. It is like the Wizard Control is acting like a container that I need to get into.

Thanks!
 
Update

I have made the following changes based on another article that should have worked:

objComm.Parameters.AddWithValue("@course_title", DLCM_Interface.FindControl("txtCourseFind"))


I am frustrated >:)

Steve
 

Latest posts

Back
Top