Unfortuntely you cant do this with usercontrols. You have to manually
declar teh control in your code behind then (in OnInit) use FindControl to
get teh actual page instance of the control and assign it to the code behind
variable for access.
"vikram" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
I have made a web user control (.ascx). Now i want when
user drags it on any aspx page , its declaration in the
code behind should come automatically like this :
Private Withevents <UserControl1> as new <UserControl>.
How can i achive this ?
thanks