By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,760 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,760 IT Pros & Developers. It's quick & easy.

User Control Dropdownlist: can't assign value to

P: n/a
The following doesn't assign value to the dropdownlist - WHY?
__________________________________________________ _________________
In a user control (ascx named USACustomer) :

Public Property State() As String
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.



Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.