How do I find Datagrid in a Page

K

Kb

I am completely lost. I have page that has usercontrol that has bunch of
datagrids. How do I iterate through the controls in usercontrol to find
datagrid? I did

For Each my_Controls In Me.Controls
If TypeOf my_Controls Is DataGrid Then
CType(my_Controls, DataGrid).Save()
End If
Next
in the user control but this code does not work. Help!
 
S

Scott M.

I would think that you should be iterating through the User Control's
controls, rather than the web page's controls.
 

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,780
Messages
2,569,608
Members
45,245
Latest member
Evelyne64L

Latest Threads

Top