How call usercontrol function if its inside a formview control?

C

Cirene

I have a simple usercontrol with a few controls and a few public functions.
It basically is a time control - 1 textbox for Hour, 1 textbox for Minute
and 1 dropdown for am/pm. Some public functions for example are gettime,
settime, gethour, etc...

I dropped several of these usercontrols inside the InsertItemTemplate of a
formview control. (It's a work week time scenario.)

QUESTION: How do I call one of the usercontrols public function?

I tried this but the function won't be called:

i = CType(FormView1.FindControl("ucClosingTimeSunday"),
UserControl).GetHour()

Any ideas what I'm doing wrong? Thanks!
 
C

Cirene

This seemed to work better...

CType(FormView1.FindControl("ucClosingTimeSunday"), ucTimeSelect).GetHour()

Thanks..
 

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top