Groups | Blog | Home
all groups > asp.net building controls > june 2005 >

asp.net building controls : Reach UserControl from ASPX codebehind?


Özden Irmak
6/16/2005 12:00:00 AM
Hi,

I created a usercontrol and dropped it onto my aspx...

But from CodeBehind of that aspx I can't reach to that UserControl...I just
want to reach to it just like when I dropped for instance a textbox onto
that form so I can play with it's properties and subscribe to it's events?

Anybody can help?

I'm using Framework 1.1

Regards,

Özden Irmak

Özden Irmak
6/16/2005 12:00:00 AM
Thanks for the reply, and I found my solution...

JCThumbView JCThumbView1 = (JCThumbView)Page.FindControl("JCThumbView1");

this works...

[quoted text, click to view]

Brock Allen
6/16/2005 7:59:03 AM
If the user control has a codebehind, than that's the class you can declare
and use from your ASPX's codebehind. If the ASCX doesn't, then the only place
you'll be able to make early bound function calls on it is from any inline
code in your ASPX.

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


AddThis Social Bookmark Button