asp.net - How to call ASCX page Function on ASPX page? -
i add webusercontrol in runtime, can't use mywebusercontrol.myfunction()
, have masterpage , tried one:
_maincontentpage = ctype(_page.form.findcontrol("mycontentplaceholder"), contentplaceholder) ctype(_maincontentpage.findcontrol("mywebusercontrol"), mytype)
but _maincontentpage.findcontrol("mywebusercontrol")
returns tablecell.
the way add wubusercontrol:
tcvalue = new tablecell() tcvalue.controls.add(_page.loadcontrol("paht/webusercontrol")) tcvalue.id = "mywebusercontrol"
well thats cause _maincontentpage.findcontrol("mywebusercontrol")
returns tablecell how webcontrol , call fcuntion.
how difficult make function web method or extract function in asp.net http handler accessed globally. think way can make better rather using reflections , other things access it.
Comments
Post a Comment