Mini Nerd

10 April 2006

PRFDSR

Or, "parent reference from databound selection routine":


Public Sub BoundControlSelection(s As Object, e As EventArgs)

Dim oBoundControl As BoundControl 'DropDownList, CheckBox, etc
Dim oLabel As Label oDropDownList = CType(sender, BoundControl )

oLabel = oDropDownList.Parent.FindControl("lblStatus")


oLabel.Text = "Hello"
End Sub

Labels: , ,

0 Comments:

Post a Comment

<< Home