Hi all.
this is probably so simple but I've tried and failed!
I want to put my controls is a folder to keep the project tidy.
(seemed like a good idea).
so I ended up with this code:
then I tried something like:Code:Dim wucDayNum As Control = LoadControl("~/Controls/wucOnightOpsDayNum.ascx") wucDayNum.ID = "wucDayNum" + "1" pnlDayNum.Controls.Add(wucDayNum)
both lines tell me that wucOnightOpsDayNum is not defined.Code:Dim wucdn As wucOnightOpsDayNum = pnlDayNum.FindControl("wucDayNum1") Dim txtMyName As TextBox = DirectCast(pnlDayNum.FindControl("wucDayNum1"), wucOnightOpsDayNum)
what is the syntax to find my control in the /controls folder?
thanks is advance.




Reply With Quote