X
xazos79
Hi All,
I've scoured the web for an answer to this to no avail.
I've developed a dual list control that has a few standard controls on
it (2 list boxes, some buttons etc).
I've defined the following property on the user control:
[Description("The field in the data source which provides the item
text."),
Category("Data"),
DefaultValue(DATA_TEXT_FIELD_DEFAULT)]
public string DataTextField
{
get { return m_dataTextField; }
set
{
m_dataTextField = value;
lstAvailable.DataTextField = m_dataTextField;
}
}
If i leave the property as default all is fine, however, if i set the
property like so:
<UC
ualListBox ID="dlRolesDualListBox" runat="server"
DataTextField="RoleName"/>
I get a NullReferenceException in the set accessor method for the
lstAvailable control. Can anyone offer any reasons why lstAvailable
(listbox) hasn't been initialized ?
Cheers for any help.
I've scoured the web for an answer to this to no avail.
I've developed a dual list control that has a few standard controls on
it (2 list boxes, some buttons etc).
I've defined the following property on the user control:
[Description("The field in the data source which provides the item
text."),
Category("Data"),
DefaultValue(DATA_TEXT_FIELD_DEFAULT)]
public string DataTextField
{
get { return m_dataTextField; }
set
{
m_dataTextField = value;
lstAvailable.DataTextField = m_dataTextField;
}
}
If i leave the property as default all is fine, however, if i set the
property like so:
<UC
DataTextField="RoleName"/>
I get a NullReferenceException in the set accessor method for the
lstAvailable control. Can anyone offer any reasons why lstAvailable
(listbox) hasn't been initialized ?
Cheers for any help.