I am writing an web app in asp.net using .net 3.5 and vs 2010;
I creatd a web user control (.ascx), and i want to insert it to a panel taht i created in a simple cs class (not a aspx.cs),
my class is in App_Code, the problem is that the class dous not Identifies the user control name so for example i cant do:
public class MyClass
{
public MyClass() { }
public void foo(MyCtrl i_MyCtrl)
{
//doing somthing
}
}
I search for an answer on the web, and people say it cant be done in .net 2 and vs 2005/8 but nothing about .net 3.5 and vs 2010
the thing is that you cant create a butten (a buttten is a control) , so this make me think maybe there a chance to create a dynamically user control in a simple cs file.
please helpe
thanks.