S
Shawn Wildermuth
I have some simple code that loads a control with LoadControl and casts it
to the codebehind object:
Control ctrl = LoadControl("~/Controls/BlogEntryViewer.ascx");
BlogEntryViewer entry = (BlogEntryViewer)ctrl;
About 80% of the time this fails in the cast. The BlogEntryViewer.ascx file
specifies the right file (and it compiles btw):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BlogEntryViewer.ascx.cs"
Inherits="BlogEntryViewer" %>
About 10% of the time I get a "cannot load ASPNET_XXXXX assembly" message.
I am totally confused. THis is a converted Beta 2->RC project so it might
be about that, not sure.
Anyone have any idea? I am ripping out my hair.
Thanks,
Shawn Wildermuth
Speaker, Author and C# MV
to the codebehind object:
Control ctrl = LoadControl("~/Controls/BlogEntryViewer.ascx");
BlogEntryViewer entry = (BlogEntryViewer)ctrl;
About 80% of the time this fails in the cast. The BlogEntryViewer.ascx file
specifies the right file (and it compiles btw):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BlogEntryViewer.ascx.cs"
Inherits="BlogEntryViewer" %>
About 10% of the time I get a "cannot load ASPNET_XXXXX assembly" message.
I am totally confused. THis is a converted Beta 2->RC project so it might
be about that, not sure.
Anyone have any idea? I am ripping out my hair.
Thanks,
Shawn Wildermuth
Speaker, Author and C# MV