Add-ons

External Page Control

by ifs School of Finance (Other Publisher)
Updated on: October 2, 2009 | 20586 views

Compatibility: Version 3.7 , Version 3.6
Version: 1.0
Tags: Sitefinity Validated , Other , Free
Control that allows you to include external pages in Sitefinity Terms Of Use

Download from Publisher
FREE

This control allows you to display any *.ascx file on your Sitefinity page. 

We ran in to the difficulty of wanting to include custom written .Net pages withinthe Sitefinity structure.  This control allowed us to do that without having to rewrite them as Sitefinity user controls.

Just write your external page as a normal ASCX  file, drop this control on your page and point its main property to the ASCX file.

Sitefinity CMS validated extension

7 comments

  • Ricardo Espinosa 05 Oct 2009
    12:47 PM
    I don't understand how to use this.

    I added the control to sitefinity but can't make it work with the control I created. The "main" property IncludedFileName references a local file within the sitefinity site. I tried uploading in there my control but the it says it can't find the definition for a label and fails to load.

    What am I doing wrong? What's missing?
  • Karl 06 Oct 2009
    04:56 AM
    Hi Ricardo,

    I'm sorry to hear there are problems using the control on your SiteFinity installation.  

    I'm looking in to your problem now.  Can I ask: which version of SiteFinity are you using?

    Kind regards,

    Karl, 
    ifs School of Finance.
  • Ricardo Espinosa 06 Oct 2009
    01:50 PM
    Hi Karl I'm using version 3.6

    What steps should I follow to use my control or how should I build my .ascx for it to work with your control?

    Thanks in advanced
  • Karl 07 Oct 2009
    05:17 AM
    Hi Ricardo,

    The steps to use your control in SiteFinity are:

    1. Copy the IncludeExternalPage.ascx and IncludeExternalPage.vb to your SiteFinity installation.  For this example I put mine in ~/Sitefinity/UserControls

    2. Update your Web.config by adding into the <toolboxControls> section the following tag: <add name="Include Page" section="Forms" url="~/Sitefinity/UserControls/IncludeExternalPage.ascx" description="Includes an external page." />

    3. Log in to your SiteFinity admin system 

    4. Go to edit a page and you should see the "Include Page" control in your toolbox in the Forms section.

    5. Drag and drop the Include Page control to somewhere on your page

    6. Copy the ASCX file you want to include to somewhere in your SiteFinity installation.  NB your ASCX page must inherit from System.Web.UI.Usercontrol

    7. Edit the Include Page Control and use the 'Select' button to choose the control you just uploaded

    8. Click "I'm done" and your control will appear on the screen.  You can now include any ASCX file on your site without registering it in your web.config.

    This morning I tested it on a fresh 3.5 installation.

    If the steps above don't get it working on your SiteFinity installation we'll have a closer look at it.

    Let me know how you get on.

    Karl.
  • Ricardo Espinosa 07 Oct 2009
    05:04 PM
    On step 6 you mean my ascx should have this?
    public partial class Login : System.Web.UI.UserControl

    'cause it does.

    I get up to step 7 no problem but when I click on "I'm done" all I get (on my page preview ins stiefinity) is "The resource object with key 'lblErrorIncorrectos' was not found" lblErrorIncorrectos is a label inside my ascx but just can't make it work.

    Thanks again for your help and thanks in advance for you reply.
    Regards.
  • Ricardo Espinosa 07 Oct 2009
    05:14 PM
    I just found out the problem. I'm using a Resources file.

    I copied my App_GlobalResources folder (which includes the missing .resx file) to my sitefinity site root and now it's working.
    Thanks for your help. Looks like the control works great!
  • Karl 08 Oct 2009
    04:13 AM
    No problem, I'm glad to have helped.

    I hope the plugin is useful for you.

    Kind regards,

    Karl.

Add Comment

  • Providing an email will subscribe you for receving comment notifications.

  •