S
SushiSean
The problem is we have to move from framework 2 to 3.5 version
and some code start give me an error.
//framework 2 (works correct)
LayoutParts_SessionWork pWork =
this.LoadControl("~/LayoutParts/SessionWork.ascx") as LayoutParts_SessionWork;
pWork get class and works fine, but in 3.5 version thee same code give me
an error because pWork is NULL.
I have tried other way of convertion object to class
LayoutParts_SessionWork pWork =
(LayoutParts_SessionWork)this.LoadControl("~/LayoutParts/SessionWork.ascx");
and it works correct on both.
The question: why "object as [class name]" stop working? I need to do tons
of work because of it. Can somebody told me what is wrong?
and some code start give me an error.
//framework 2 (works correct)
LayoutParts_SessionWork pWork =
this.LoadControl("~/LayoutParts/SessionWork.ascx") as LayoutParts_SessionWork;
pWork get class and works fine, but in 3.5 version thee same code give me
an error because pWork is NULL.
I have tried other way of convertion object to class
LayoutParts_SessionWork pWork =
(LayoutParts_SessionWork)this.LoadControl("~/LayoutParts/SessionWork.ascx");
and it works correct on both.
The question: why "object as [class name]" stop working? I need to do tons
of work because of it. Can somebody told me what is wrong?