G
Guest
hi,
How can I retrieve the Control (wucState.ascx) from the Placeholder at the
even: btn_Click:
//declaration at page
protected wucState WucState1; -- my control
....
private void Page_Load(object sender, System.EventArgs e)
{
....
WucState1 = Page.LoadControl("wucState.ascx") as wucState;
plhState.Controls.Add(WucState1);
....
}
....
private void btn_Click(object sender, System.EventArgs e)
{
WucState1 = (wucState)plhState.Controls[0]; // ERROR !!!!!! CANNOT FIND
THE CONTROL
....
}
any idea ? please with code sample.
thanx,
Oren
How can I retrieve the Control (wucState.ascx) from the Placeholder at the
even: btn_Click:
//declaration at page
protected wucState WucState1; -- my control
....
private void Page_Load(object sender, System.EventArgs e)
{
....
WucState1 = Page.LoadControl("wucState.ascx") as wucState;
plhState.Controls.Add(WucState1);
....
}
....
private void btn_Click(object sender, System.EventArgs e)
{
WucState1 = (wucState)plhState.Controls[0]; // ERROR !!!!!! CANNOT FIND
THE CONTROL
....
}
any idea ? please with code sample.
thanx,
Oren