Webcontrol containing a UserControl?? Problem ...
I am building a WebControl component that will implement a complete
message board system. So far so good and I am listing forums,
Now I am trying to embed various UserControls (forms for posting,
preview etc.) into the main WebControl. I am using the following code
Control objParent = Page.FindControl("objParent");
string strPath = m_strInstallDir + "/Forms/" + strObject + ".ascx";
UserControl objForm = (UserControl)Page.LoadControl(strPath);
This works fine and I am able to render the form into the control by
using RenderChildren() during rendering. Should I be adding the
control at some other point during initialization of the web control?
My problem is that all the OnClick events in the UserControl no longer
seem to work! The UserControl using codebehind with all the events in
the .CS file. How can I hook up all the events????
I also fail to get the any postback in the WebControl's
Can anyone point me to a working sample of what I am trying to do?
Is it possible .. if so why can't I find any samples!!
|All times are GMT. The time now is 01:13 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.