473,387 Members | 1,745 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,387 software developers and data experts.

Get all Control objects from a .DLL associated with an ASP.NET page?

I am trying to get all the control objects using C# code that resides in a
..DLL
that my ASP.NET page uses. However I can't seem to get a list of all the
controls associated with my ASP.NET page. I have tried the following:

this.Controls
this.Page.Controls
this.Parent.Controls

and came up empty. Anyone have any suggestions if this is possible and if so
what
the magic incantation is????
Nov 19 '05 #1
2 1375
One of the problem might be timing.
You probably calling this.Page.Controls before that collection has been populated.
Check the Page.EnsureChildControls

might be what you need
Also you are scarring me when saying
"I am trying to get all the control objects using C# code that resides in a .DLL"
What DLL and how it got access to the Page object?

George.

"Peter" <sp**@nospamerino.com> wrote in message news:Zs********************@comcast.com...
I am trying to get all the control objects using C# code that resides in a
.DLL
that my ASP.NET page uses. However I can't seem to get a list of all the
controls associated with my ASP.NET page. I have tried the following:

this.Controls
this.Page.Controls
this.Parent.Controls

and came up empty. Anyone have any suggestions if this is possible and if so
what
the magic incantation is????
Nov 19 '05 #2
Okay I'll check it out. As for the DLL it is one that I am referencing (after using
the ASP.NET import statement, which I placed) in the /wwwroot/bin directory.
"George" <no****@hotmail.com> wrote in message news:ea**************@TK2MSFTNGP15.phx.gbl...
One of the problem might be timing.
You probably calling this.Page.Controls before that collection has been populated.
Check the Page.EnsureChildControls

might be what you need
Also you are scarring me when saying
"I am trying to get all the control objects using C# code that resides in a .DLL"
What DLL and how it got access to the Page object?

George.

"Peter" <sp**@nospamerino.com> wrote in message news:Zs********************@comcast.com...
I am trying to get all the control objects using C# code that resides in a
.DLL
that my ASP.NET page uses. However I can't seem to get a list of all the
controls associated with my ASP.NET page. I have tried the following:

this.Controls
this.Page.Controls
this.Parent.Controls

and came up empty. Anyone have any suggestions if this is possible and if so
what
the magic incantation is????
Nov 19 '05 #3

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

Similar topics

4
by: (Pete Cresswell) | last post by:
I'm getting nodes into the thing, but when the dust settles, only the root-level nodes are visible. I know they're there because .Nodes.Count gives the right number.\ But I don't really...
2
by: DocAccolade | last post by:
I am trying to include a legacy com control (controlname.ocx) in an asp.net application using vs 2003. I have added the control to the user control tool box, then dragged it to the form. However,...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: Hans Merkl | last post by:
Hi, I am trying to use a user control as EditItemTemplate in a DataList. It loads fine but I can't figure out how to bind to the data of the DataList. Here is what I have got so far: ...
4
by: Hugh O | last post by:
Hi, I have been able to use the following kinds of code to access basic information on the individual controls that would be in any Web page. ?Me.Controls(1).Controls(56).GetType.Name ' ...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
3
by: Developer in California | last post by:
I am working on developing a generic Web framework using Master Pages in ASP.NET 2.0. What I have done is created a PageRenderer class which has a public method which will retrieve the path of the...
2
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer...
7
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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
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...

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.