1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Simple Linq Module with Link Selector

Simple Linq Module with Link Selector

5 posts, 0 answered
  1. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    05 Jan 2010
    Link to this post
    Hi all,

      I am creating a simple module for setting up promos to pages within the web site.  The module is working however the admin sees [Sitefinity]d30627b8-f2be-4a0a-9013-fb2b811d563b for a url link.  I would like enable the admin to see a friendly looking link in the list (example: somepage.aspx).

    Here is my current code of the selector:

    <asp:TextBox ID="txtURL" runat="server"></asp:TextBox> 
     <sfLib:ButtonSelector ID="ButtonSelector1" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/PagesSelector.aspx" 
       AssociatedControls="txtURL" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/Dialogs/ButtonSelector.ascx" runat="server" ButtonText="Select" /> 

     Thanks for any help.
    David
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 Jan 2010
    Link to this post
    Hi David ,

    It would not be possible to do this and it does not make sense, because once you replace the value with friendly looking link in the list (example: somepage.aspx) this value will be persisted and you will loose the dynamic links functionality. This means once you change something in the title of your page/link (somepage.aspx) this will break the link in all instances instead of keeping it working correctly. This was once of the major problem we had before version 3.5.  The better option here is just addding a Label/Literal or another oppropriate control that will show the actual page/link. You can easily set the value and event more resoved to another control using AssociatedControls property of the ButtonSelector

    <asp:TextBox ID="txtURL" runat="server"></asp:TextBox>
    <asp:Label ID="Label1" runat="server"></Label>
     <sfLib:ButtonSelector ID="ButtonSelector1" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/PagesSelector.aspx"
       AssociatedControls="txtURL, Label1" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/Dialogs/ButtonSelector.ascx" runat="server" ButtonText="Select" />

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    05 Jan 2010
    Link to this post
    Thanks Ivan, that make sense.  I will add the extra label to show the the page link.  Well time get back to coding,  I am hoping this new Sitefinity site will be live by the end of Jan.

    Thanks Again
    David
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 Jan 2010
    Link to this post
    Hi David ,

    Good to hear that. Once you are ready with the project, you may contact our sales and they will add the website in our Showcases gallery, of course if you would like it.


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    05 Jan 2010
    Link to this post
    This new site is going to have some cool features, we will be doing a white paper.  I will be interfacing with Adobe Scene 7 for displaying product images with dynamic resizing and etc.  
Register for webinar
5 posts, 0 answered