lbeckman
06-11-2007, 06:28 PM
Hey, I'm using ASP with C#, and need to have a page's source updated upon clicking a link to change an SSI directive.
At the moment I've got:
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
in with my html,
and
protected void LinkButton1_Click(object sender, EventArgs e)
{
Literal1.Text = "<!--#include virtual=\".\\contentNew\\testpage.aspx\"-->";
}
in my associated C# code.
Now this kind of works. When clicking on the Link, the source is updated to containt the <!--#include virtual=".\contentNew\testpage.aspx"-->
However, this is exactly what ends up in the source, it's not processed like SSI usually is and replaced with the actual testpage.aspx. Is there any way I can get testpage.aspx to be included in the source instead of the include statement itself, or should I be going with a different approach entirely?
At the moment I've got:
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
in with my html,
and
protected void LinkButton1_Click(object sender, EventArgs e)
{
Literal1.Text = "<!--#include virtual=\".\\contentNew\\testpage.aspx\"-->";
}
in my associated C# code.
Now this kind of works. When clicking on the Link, the source is updated to containt the <!--#include virtual=".\contentNew\testpage.aspx"-->
However, this is exactly what ends up in the source, it's not processed like SSI usually is and replaced with the actual testpage.aspx. Is there any way I can get testpage.aspx to be included in the source instead of the include statement itself, or should I be going with a different approach entirely?