|
-
January 13th, 2003, 05:34 AM
#1
Accessing values od dropdown in a usercontrol.
I have made a usercontrol consisting of a dropdownlist which is poupulated with item from database.I used this usercontrol in a datagrid but was unable to access the value selected by the user from the usercontrol.How can i access the values ?
Regards,
Aman
-
January 17th, 2003, 05:54 PM
#2
You have to create properties of the usercontrol that are passed back to the aspx page.
Try something like this in the usercontrol code
Public ReadOnly Property DropDownListValue() as string
Get
DropDownListValue = dropdownlist1.SelectedItem.Text
End Get
End Property
You would access this in your aspx page like this
strValue = Usercontrolname.DropDownListValue
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|