Hi,
I have the following problem. I create RadComboBox in code-behind Page_init
The ComboBox is created OK but I cannot find it with
It's keep telling me
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Why isn't the control added to the Controls collection?
Regards,
Marc
I have the following problem. I create RadComboBox in code-behind Page_init
| Dim ddl As RadComboBox |
| Dim sqlSource As SqlDataSource |
| ddl = New RadComboBox |
| sqlSource = New SqlDataSource |
| sqlSource.ConnectionString = WebConfigurationManager.ConnectionStrings(TablePrefix).ConnectionString |
| sqlSource.SelectCommand = " SELECT ValueText, " & UItaal & "text AS tekst FROM " & TablePrefix & "_" & ArrCategory & " " |
| plh_Category.Controls.Add(ddl) |
| ddl.DataSource = sqlSource |
| ddl.ID = "ddl_BU" |
| ddl.EmptyMessage = GetGlobalResourceObject("Insight", "Maak uw selectie") |
| ddl.DataValueField = "ValueText" |
| ddl.DataTextField = "tekst" |
| ddl.DataBind() |
| Dim ddl As RadComboBox = Page.FindControl("ddl_BU") |
It's keep telling me
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Why isn't the control added to the Controls collection?
Regards,
Marc