Groups | Blog | Home
all groups > asp.net building controls > july 2003 >

asp.net building controls : Custom Control


Darren
7/29/2003 11:00:58 PM
Can someone please help with how to access a generated
value in a custom control.

I have an aspx page that contains an ascx (ctl1) control
which in turn contains several ascx controls (ctl2, ctl3)

I need to click a button on ascx1 and retrive a value
from ascx2

My project is based on the starter kit portal hence the
structure.

Victor Garcia Aprea [MVP]
8/4/2003 1:12:22 AM
Hi Darren,

You can use the FindControl method or the Controls property of ctl1 to get a
reference to ctl2, you will obtain a Control-type, cast it to your
usercontrol-derived type, and then access any public property or method.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
[quoted text, click to view]

AddThis Social Bookmark Button