473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Design Time Support

Hi..

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.
Jul 21 '05 #1
5 1336
Hi Zviki,

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

Cor
\\\
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
Next
///
Jul 21 '05 #2
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 ?

Thanks

Zviki

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ep**************@tk2msftngp13.phx.gbl...
Hi Zviki,

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

Cor
\\\
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
Next
///

Jul 21 '05 #3
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 ?

Thanks

Zviki

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ep**************@tk2msftngp13.phx.gbl...
Hi Zviki,

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

Cor
\\\
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
Next
///

Jul 21 '05 #4
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?

Cor
Jul 21 '05 #5
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?

Cor
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: danielhardman | last post by:
I am implementing a component that helps a developer with som localization tasks at design-time, and provides some related feature at run-time. My problem is that in order to do the design-time...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
1
by: YellowfinTeam | last post by:
Laws and Myths of Usability & Interface Design Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications....
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.