I have a Web User Control on my web application (.NET Framework 3.5, C#) :
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Home.ascx.cs" Inherits="context_centro_Home" %>
<div class="main">
Hello page
</div>
<%=strBuild %>
Now, the content of the string strBuild is not produced by Home.ascx.cs, but from Testo.ascx.cs; so I think I need to inject the Testo's Web User Control into Home.
Is it possible? How can I do it?
This is pretty Ugly, but should work :
Having suggested a fairly ugly solution, I would go further to say you may want to consider changing your architecture here – as I’m not 100% clear opn what you are trying to acheive I’m not quite sure what to suggest! But, at the end of the day, the content of the strBuild variable should probably be populated in a Third user Control that is then used in both Testo and Home user controls. e.g.:
where strBuild Control looks like :
Make sense ?
Anyway, hope that helps,
Dave