I am trying to extend controls/yYafHeader.ascx
from its code behind, but its not working.
This is what I have done.
- Changed code-behind as well as markup in YAF source code project for the file controls/YafHeader.ascx.cs, by adding below code
- Rebuild the source code project containing above changes
- Copied over YAF.dll from bin folder of above YAF project to the YAF project without source code
- Added the same custom markup to controls/YafHeader.ascx in YAF project without source code
When I run the YAF project without source code, I don't see the literal control being emitted from code-behind that I expected to be there when I copied over YAF.dll from the full source code project. Question
: Why is the customization for YafHeader.ascx not working in this situation? May be I need to add some other dll or make these changes in some other place.Custom PlaceHolder added
Custom code behind added
<asp:PlaceHolder runat="server" id="phCustom"></asp:PlaceHolder>
protected void Page_Init(object sender, EventArgs args)
LiteralControl html = new LiteralControl("<h2>Testing user control code</h2>");
Edited by user
| Reason: added Solved status for benefit of others