473,386 Members | 1,810 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,386 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 1335
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.