Custom Control

D

Darren

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.

Any assistance will be appreciated
 
V

Victor Garcia Aprea [MVP]

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top