Right-click Menu on rendered RadButton hyperlink?

6 posts, 0 answers
  1. Michael O'Flaherty
    Michael O'Flaherty avatar
    67 posts
    Member since:
    Jun 2010

    Posted 28 Jan 2013 Link to this post

    Hi!

    We have defined this button:
    <telerik:RadButton ID="radButtonNewPlacement" Text="New Placement" ToolTip="#" ButtonType="LinkButton" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" runat="server" CssClass="radButtonNoImage" OnClick="radButtonNewPlacement_Click" NavigateUrl="http://www.bing.com" />

    ...which results in this HTML:

    <a id="radButtonNewPlacement" title="#" class="RadButton RadButton_Office2010Blue rbLinkButton radButtonNoImage" href="http://www.bing.com"><span class="rbText">New Placement</span><input id="radButtonNewPlacement_ClientState" name="radButtonNewPlacement_ClientState" type="hidden" /></a>

    In IE, we would like the user to be able to right-click on this hyperlink and select 'Open In New Tab.' Unfortunately, this hyperlink does not work like a regular hyperlink. Why? And how can we make this behave?

    Thanks!
    Michael
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2013 Link to this post

    Hi Michael

    I  tried the exact scenario with the latest version of Telerik controls in IE9 and it worked as expected.
    Please check the screenshot as well.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael O'Flaherty
    Michael O'Flaherty avatar
    67 posts
    Member since:
    Jun 2010

    Posted 29 Jan 2013 Link to this post

    Attached is the right-click menu from the code below. Note, there are hyperlink columns in a RadGrid on the page that do support the right-click (but I had to redact due to sensitive information.)

  5. Michael O'Flaherty
    Michael O'Flaherty avatar
    67 posts
    Member since:
    Jun 2010

    Posted 29 Jan 2013 Link to this post

    We are using IE9 as well by the way...
  6. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 31 Jan 2013 Link to this post

    Hello Michael,

    As you have already noticed - RadButton is rendered as an anchor with a span and a hidden input inside of it. Most browsers like - Mozilla, Chrome and Opera are triggering the contextmenu on the anchor element (bubble effect) when the click event is triggered, while Internet Explorer is triggering it on the span element. This is a browser behaviour, and we do not have much control on it.

    Regards,
    Danail Vasilev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Michael O'Flaherty
    Michael O'Flaherty avatar
    67 posts
    Member since:
    Jun 2010

    Posted 31 Jan 2013 Link to this post

    This post actually has a solution that seems to work: http://www.telerik.com/community/forums/aspnet-ajax/button/right-clicking-linkbutton-download-to-save-target-as.aspx. We are testing it now...
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017