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 5 of 5

Thread: Telerik Controls in Template.ascx

  1. #1
    Brigath is offline Junior Member
    Join Date
    Jun 2009
    Posts
    1

    Default Telerik Controls in Template.ascx

    Has anyone used Telerik controls in their template files? I want to use the RadMenu, but it requires the Script Manager, which requires a server side form in the template, which bombs on any pages like signin.aspx which already has a form tag.

    Has anyone else tried to do this and found a way to make it work?

    Thanks!
    Matthew

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    From this point on I'm going to assume we are talking about the AJAX version and not the older html version. Since the requirement of the Script Manager is mentioned. This information should not be used for the html version.

    Where a forum tag already exist simply add the Script Manager/Rad Script Manager. I would also highly suggest registering the telerik prefix in the web.config so you don't have to edit every page when you upgrade the controls.

    The real work begins when you start trying to add forum tags to pages that currently don't have them. Doing so on entity pages will cause a blank page to show.

    To over come this you will need to do four things.
    1. Add public string to the ShowEntityPage that returns the private m_PageOutput string.
    2. Add a Literal control to entity pages. Preferably outside of the forum tag so you don't have embedded forum issues.
    3. Go into the code behind for entity pages and set the newly added Literal control text to the public m_PageOutput sring.
    4. Comment out the override on RenderContents or delete if you wish. I comment the lines so it is a bit easier to compare lines when upgrading.


    As far as appending data to the control this can very depending on if you wish to be able to keep using using ComponentArt for some skins or not (including the admin as a separate skin). Either way it is mostly editing EntityMenuList.xslt so the xml output works with the rad menu control instead. Remember that case does matter in xml!

    Hopefully that helps.
    Last edited by mmcgeachy; 12-18-2009 at 09:21 AM.

  3. #3
    Brigath is offline Junior Member
    Join Date
    Jun 2009
    Posts
    1

    Default

    Thanks for your input! And, yes it's the ajax controls. Let me be more specific about the issue though, as what you describe doesn't quite apply to what we are doing, or at least not to the way we are doing it


    We have completely reskinned our storefront, and as such have customized template.ascx as well as hometemplate.ascx. These are the files where we are including the RadMenu, so that we have the consistant navigation throughout the site without modifying any of the standard aspdnsf files. In order to use the RadMenu, we have to include a ScriptManager *before* the menu control. So the ScriptManager has to live in the template, which means the server side form has to live in the template.

    This works beautifully for topic pages, product pages, product grid, etc. The problem comes when a page needs to be served up that has form controls in it already, like signin.aspx. At that point, ASPDNSF tries to wrap the page with the template file and suddenly we have two server side forms. And since the template is outside the aspdnsf aspx file, it doesn't help to have a version of the template without the form tag, because the RadControls are outside the scope of the inner form tag.


    I hope that makes things clearer!

  4. #4
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    Quote Originally Posted by Brigath View Post
    In order to use the RadMenu, we have to include a ScriptManager *before* the menu control. So the ScriptManager has to live in the template, which means the server side form has to live in the template.
    This is not true. At least for radmenu. It may be the case for some other ajax controls but not radmenu. Radmenu can be at any position in the code and still work. It can be outside of the forum tag also. I know this because I have radmenu this way and it is working fine with no issues.

    Because the forum tag with the runat sever tag is already in use you can't put the another forum tag with runat sever directly into the template asxc files. You can however allow it be inherited from the child page. This inheritance I think doesn't exist in all versions but does in the current. Sadly I can't find the thread the talked about it though (was quite some time ago).

    Yes it is a different way to do things but it does work and isn't all the different.

  5. #5
    StokesWebDevelopment is offline Junior Member
    Join Date
    Jul 2009
    Location
    Walnut Cove, NC
    Posts
    20

    Default

    Another option is to use the non Ajax version of RadMenu from the Q1 2009 build. Works for me.
    Randall Moore | Web Developer
    Stokes Web Development
    www.stokesweb.com