Design Time Support


Cor Ligthert

Hi Zviki,

I am not sure what you are after however I get somehow the idea that you
need something as this?

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
Dim tb As TextBox
If TypeOf ctl Is TextBox Then
tb = DirectCast(ctl, TextBox)
tb.Text = String.Empty
End If

Zviki Goldberg


I need to know in design time in ASP.NET inside a control (for ex), who is
the Page that contain him. I tried to use the Pae property or the Parent
property but they are NULL.
I need tha page type or namr or something like that.

Is it possible ??

Thanks a lot


Zviki Goldberg

Thanks for your answer, but it does not help.
I have a control that can be placed on many forms and I need from inseide to
know who is the parent page. I tried what you suggested and it return NULL,
even if I know that name of the parent page.

Do you have any other suggestion ?



Cor Ligthert

Hi Zviki,

This did give back to me Form1 the Id of the parent.

Dim a As String = Me.Image1.Parent.UniqueID

I hope this helps?


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