Question : ASP.NET unable to cast object of type

I am trying to load a user control from an ASPX page but I keep getting an error “unable to cast object of type”

Here is my code, has anyone come across this before?

private void UpdateDetails(string elementID, UpdatePanel panel)
{
        Control ctrl = Page.LoadControl("~/MyDetails.ascx");
        panel.ContentTemplateContainer.Controls.Add(ctrl);
        MyDetails details = (MyDetails)ctrl;
        details.MyID = int.Parse(elementID);
}

Answer : ASP.NET unable to cast object of type

AFAIK is still well supported (last Dev release is dated July 25, few days ago http://indy.fulgan.com/zip/)

The 10 version was needed for compatibility and implamentations with .net. That's why there're so many differences between 9 and 10, but I'm pretty sure that the support still will exists for long time.
Random Solutions  
 
programming4us programming4us