More in this section

Forums / Developing with Sitefinity / fullContent1 wihtout asp:HyperLink control

fullContent1 wihtout asp:HyperLink control

4 posts, 0 answered
  1. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    26 Feb 2009
    Link to this post
    I'm building a custom module and need the url contained in the asp:HyperLink control ID="fullContent1" in the ListPageMaster.ascx template, but CANNOT use the asp:HyperLink control, itself.  Can I populate a literal with the "fullContent1" data?  I've tried using a literal with an ID="fullContent1", but it's always blank.  I've also tried to copy the NavigateUrl propery of the asp:HyperLink control on the OnItemDataBound event, but this, too, is blank.  I assume that the NavigateUrl property is empty when OnItemDataBound fires.

    How can I get the data associated with the "fullContent1" ID into a Literal?  I've formulated a workaround that does the job, but know that I must just be missing something.

    Thanks in advance.
  2. Ricky
    Ricky avatar
    12 posts
    Registered:
    09 Feb 2017
    26 Feb 2009
    Link to this post
    Hello Larry Brinley,

    Basically , what happens when you add a "Fullcontent + index" is that it validates whether the control is HyperLink and then it sets HyperLink.NavigateUrl  to the detail path.  Now, if you want to get around this with a Literal then you can try a FindControl method during OnPreRender and set the navigate url to an ITextControl and hide the HyperLink control if you want.

    Hope that helps,
    Mehfuz

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    26 Feb 2009
    Link to this post
    Mehfuz,

    Thanks for the reply.

    I attached an OnPreRender event handler to the HyperLink control which populates my Literal control with the correct URI and hides the HyperLink control like you suggested.  Works perfectly.

    Thanks again.
  4. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    02 Mar 2009
    Link to this post
    Hello Larry Brinley,

    we are glad that Mehfuz was able to help you. Let us know if there is anything else we can do for you.

    Greetings,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered