CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Another issue with my controls

Print topic Send  topic

Author Message
drpcken

Posts: 60
Posted: 08/20/2004, 3:12 PM

I have 2 different types of controls...a dropdownlist and a multiselect listitem box, both of which are assigned a datasource, Text Column, and Binding Column.

When I'm working in the vb, and try to call these controls and use their properties, my build always tells me they arent declared... for instance i want to get the value of the dropdownlist which I named DropDownList1, when I try DropDownList1.SelectedItem.Text it always tells me that "DropDownList1 is not declared". It does this for EVERY single control I have that I write custom code for. This doesn't happen in my visual studio compiler, I'm confused as to how I go about getting this done. Here is my code...

  
        Dim sTeamLeaderID, sCounselorID, sTeamLeaderName, sCounselorName As String  
        Dim sqlConn As New SqlClient.SqlConnection("server=(local); uid=sa; pw=;initial catalog=IFPAWEB")  
        Dim sqlInsertComm As SqlClient.SqlCommand  
  
        Dim sql As String  
        Dim i As Integer  
  
        sTeamLeaderName = DropDownList1.SelectedItem.Text  
        sTeamLeaderID = DropDownList1.SelectedItem.Value  
  
        Try  
            sqlConn.Open()  
        Finally  
            For i = 0 To ListBox1.Items.Count - 1  
                If ListBox1.Items(i).Selected Then  
                    sCounselorID = ListBox1.Items(i).Value.ToString  
                    sCounselorName = ListBox1.SelectedItem.Text  
                    sql = "INSERT INTO teamleadercounselor (teamleaderid, teamleadername, counselorid, counselorname) values (" & sTeamLeaderID & ", " & sTeamLeaderName & ", " & _  
                    sCounselorID & ", " & sCounselorName & ")"  
  
                    With sqlInsertComm  
                        .Connection = sqlConn  
                        .CommandType = CommandType.Text  
                        .CommandText = sql  
                        .ExecuteScalar()  
                    End With  
                End If  
        Next i  
        End Try  

Thanks again!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.