Passing Data To and From User Control

H

Hermit Dave

J

Joan

And here is a little recursive re-entrant function in VB, that will help
when you don't know how deep you need to go to find the control you need.

Public Shared Function LocateControl(ByVal pParentControl As Control, ByVal
psID As String) As Control

Dim controlloop As Control
Dim controlfound As Control
Dim bFound As Boolean
For Each controlloop In pParentControl.Controls
If Not controlloop.ID Is Nothing Then
If controlloop.ID.ToUpper = psID.ToUpper Then
Return controlloop
End If
End If
If controlloop.Controls.Count > 0 Then
controlfound = LocateControl(controlloop, psID)
If Not controlfound Is Nothing Then
Return controlfound
End If
End If
Next
Return Nothing
End Function


in message I have a aspx page say Parent.aspx which contains a user control Child.ascx
..

I would like to pass the value of a dropdown in my parent.aspx to Child.aspx
for some calculation and get back the calculated value to the parent page.

How do I do that?
 
H

http://www.visual-basic-data-mining.net/forum

I have a aspx page say Parent.aspx which contains a user control Child.ascx .

I would like to pass the value of a dropdown in my parent.aspx to Child.aspx for some calculation and get back the calculated value to the parent page.

How do I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top