M
Martin Perfelian
Hi!
I have a page where I want to programatically call a UserControl and
get the HTML of that control for more processing. I have looked at the
msdn documentation for the RenderControl method, but I can not get the
complete HTML of the control for some reason. The ShortList control
implements two other controls required for the creation of the HTML.
The set-up looks like this:
Page(.aspx)
|
Codebehind(.cs)
|
Create instance of usercontrol ShortList
Call to RenderControl mehtod of ShortList
Put result of RenderControl in a control on Page.
ShortList(.ascx)
|
Codebhind(ascx.cs)
Stuff in Page_Init and Page_Load
What am I doing wrong? What is the correct way of creating an instance
of my control programmatically to make sure the child controls are
created too?
Kind Regards,
Martin Perfelian
I have a page where I want to programatically call a UserControl and
get the HTML of that control for more processing. I have looked at the
msdn documentation for the RenderControl method, but I can not get the
complete HTML of the control for some reason. The ShortList control
implements two other controls required for the creation of the HTML.
The set-up looks like this:
Page(.aspx)
|
Codebehind(.cs)
|
Create instance of usercontrol ShortList
Call to RenderControl mehtod of ShortList
Put result of RenderControl in a control on Page.
ShortList(.ascx)
|
Codebhind(ascx.cs)
Stuff in Page_Init and Page_Load
What am I doing wrong? What is the correct way of creating an instance
of my control programmatically to make sure the child controls are
created too?
Kind Regards,
Martin Perfelian