well it depends what "this" is set to i.e. which class you are calling it
from.
to debug it, assign this.Parent to a variable of type Object and then look
at it in the debugger. this will tell you what type of object the parent
actually is
"Esref DURNA" <es*********@microsoft.com> wrote in message
news:23**********************************@microsof t.com...
I want to get the parent of the user control.
PortalModuleControl portalModule = (PortalModuleControl) this.Parent;
but i get an error Specific cast is not valid.
and this is my class
public class PortalModuleControl : UserControl {
does anybody have any idea?
Thanks
--
Esref DURNA
Soft. Eng.