J
JJ_377
The following doesn't assign value to the dropdownlist - WHY?
___________________________________________________________________
In a user control (ascx named USACustomer) :
Public Property State() As String
Get
Return Me.ddlState.SelectedValue
End Get
Set(ByVal Value As String)
ddlState.SelectedValue = Value
End Set
End Property
In the webform:
If Not IsDBNull(drCustomer("State")) Then
USACustomer.State = drCustomer("State")
End If
__________________________________________________________________
drCustomer("State") -- a datareader that fills the dropdownlist-- does
have a value and when I step into the Property assignment statement,
Value is assigned to the datareader's value: drCustomer("State").
However, dropdownlist ddlState does not get assigned from the Property,
Value that is assigned in the User Control. In contrast, I can
successfuly assign textbox controls in the User Control using similiar
methodology from the datareader.
THANK YOU.
J.
___________________________________________________________________
In a user control (ascx named USACustomer) :
Public Property State() As String
Get
Return Me.ddlState.SelectedValue
End Get
Set(ByVal Value As String)
ddlState.SelectedValue = Value
End Set
End Property
In the webform:
If Not IsDBNull(drCustomer("State")) Then
USACustomer.State = drCustomer("State")
End If
__________________________________________________________________
drCustomer("State") -- a datareader that fills the dropdownlist-- does
have a value and when I step into the Property assignment statement,
Value is assigned to the datareader's value: drCustomer("State").
However, dropdownlist ddlState does not get assigned from the Property,
Value that is assigned in the User Control. In contrast, I can
successfuly assign textbox controls in the User Control using similiar
methodology from the datareader.
THANK YOU.
J.