Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    New to ASP, need help with SSI

    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?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    I think what you need is this.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, gave it a try but can't figure out how to get it to serve my needs at the moment. It seems that a master page can only collect content from a single content page (which makes for a really long, hard to edit file), and if I put additional content blocks in the content page for later referencing in the master page, Visual Web Developer complains that they aren't referenced in the master page and won't compile anything. For that matter, I'm not even sure if I can change the content blocks that the master page references on the fly from the code.

    Hope some of that makes sense.

  • #4
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alright, managed to get everything going with the masterpages, once I'd better researched how they worked and such. Thanks for the tip.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •