J
JBLi
Hi All,
Just trying to convert my asp.net website from using VB.net to
CSharp.net and running into UserControl referencing issue. Please help.
In my page, originally using vb.net, I can do the following:
Dim MyControl as Object = Page.FindControl(".....")
MyControl.TestMethod(...)
That, is declaring the variable as Object and "it knows the methods".
How can I do the samiliar stuff using if using CSharp? I tried to
trace-output the class type by first Page.LoadControl() the ascx file and
cased into a UserControl type, the output shown the usercontrol in the ASP.
namespace; but when I try to declare a variable in ASP.MyControl_ascx, it
complains about the ASP namespace or it does not contain MyControl_ascx.
Again, I am sure either I missed some basic learning or so. But I
cannot find help anymore nor "google-able". Please help.
Regards,
JB
Just trying to convert my asp.net website from using VB.net to
CSharp.net and running into UserControl referencing issue. Please help.
In my page, originally using vb.net, I can do the following:
Dim MyControl as Object = Page.FindControl(".....")
MyControl.TestMethod(...)
That, is declaring the variable as Object and "it knows the methods".
How can I do the samiliar stuff using if using CSharp? I tried to
trace-output the class type by first Page.LoadControl() the ascx file and
cased into a UserControl type, the output shown the usercontrol in the ASP.
namespace; but when I try to declare a variable in ASP.MyControl_ascx, it
complains about the ASP namespace or it does not contain MyControl_ascx.
Again, I am sure either I missed some basic learning or so. But I
cannot find help anymore nor "google-able". Please help.
Regards,
JB