Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 7 of 7

Thread: Adding a topic to an aspx page

  1. #1
    seasonalsin is offline Senior Member
    Join Date
    Nov 2006
    Posts
    123

    Default Adding a topic to an aspx page

    I want to add a topic to an already existing page. I have tried calling it like you would on a template or and xml pagckage and it does not work. Any ideas?
    Shawn

    http://www.FirstChoiceMarine.com

    Currently 7.1 moving to MS9.3

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    You can use the XSLTExtensionBase.Topic method to call any topic of your choice...

  3. #3
    seasonalsin is offline Senior Member
    Join Date
    Nov 2006
    Posts
    123

    Default

    Example or reference if you could please.
    Shawn

    http://www.FirstChoiceMarine.com

    Currently 7.1 moving to MS9.3

  4. #4
    mgibbs is offline Senior Member
    Join Date
    Jan 2005
    Location
    Orange County, CA
    Posts
    194

    Default

    If the "already existing page" isn't an ASPDNSF page (like you've created a custom page from scratch or it lives elsewhere in your application) you can try using the Topic Control (.asc) file called TopicControl.ascx.

    You would call this just like any other control. Add the following line to the top of your .aspx page (Underneath <%@ Page... of course):
    C#/VB.NET Code:
    <%@ Register Src="~/TopicControl.ascx" TagPrefix="tc" TagName="TopicControl" %> 
    And then call the control as follows:
    C#/VB.NET Code:
    <tc:TopicControl ID="TopicControl1" runat="server" TopicName="NameOfTopicHere" /> 
    That make sense?
    EMM for AspDotNetStorefront - Communicate effectively with your customers

  5. #5
    Upscale_Automotive is offline Senior Member
    Join Date
    Apr 2008
    Posts
    201

    Default

    Makes sense! Works like a charm! Thank you!

  6. #6
    Richnyc30 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    340

    Default aspx and template.master Topics

    Use: <asp:Literal ID="AmadeUpNameofLiteral" runat="server" Text='<%$ Tokens:Topic,TopicName%>' /> for template.master (which is not an aspx page)
    In an aspx page look at the manual for three ways to call.

  7. #7
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    The manual lists the following:

    At a direct URL, with the format: http://www.yoursite.com/t-topicname.aspx
    Embedding in a .aspx page in this format: <aspdnsf:Topic ID="IDName" runat="server" TopicName="TopicName" />
    In a skin template.ascx file, in this format: (!Topic Name="topicname"!)
    However, that doesn't specify how I would do it in code behind as the result of an If...Then statement. Does anyone have any sample code they could share to do this?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM