Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Terry Clancy 204 posts 944 karma points
    Dec 11, 2014 @ 00:45
    Terry Clancy
    0

    Standard ASPX pages that do not need Umbraco / CMS Features

    Hi all,  Simple question ...

     

    I wish to creat a standard ASPX pages that does not need Umbraco / CMS Features.  It will be a single stand alone page and so I do not need templates or other great Umbraco Features.

     

    What is the best wey to do this in an Umbraco site.  In Developer/DataTypes shold I define and use a Null Datatyype. And then in Settings/Templates should I define a template with all the content of the page on it and then in Content/Home  create just one instance of that ?   Or can it do this independently of Umbraco features with-out "bad practice" ?

     

    Thanks in anticipation,

     

    Terry

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Dec 11, 2014 @ 02:05
    Chriztian Steinmeier
    2

    Hi Terry,

    I believe you can just put the page wherever it needs to be and then tell Umbraco to ignore it, which is done in the web.config (under configuration/appSettings):

    <add key="umbracoReservedUrls"
          value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/mycustompage.aspx" />
    

    /Chriztian

  • Terry Clancy 204 posts 944 karma points
    Dec 11, 2014 @ 06:08
    Terry Clancy
    0

    Awesome - thanks - I assume sch a page could still use Umbraco and uCommece APIs right ?

  • Terry Clancy 204 posts 944 karma points
    Dec 13, 2014 @ 08:58
    Terry Clancy
    0

    Hi all,

    So in Visual Stuido I just right clicked project / Add / Web Page Razor V3  and added a page to my Umbraco site.  I also dded it to key="umbracoReservedUrls" as described above  - but when I tried to view it in the browser I got  the following error:

    Server Error in '/' Application.


    This type of page is not served.

     

    Description: The type of page you have requested is not served because it has been explicitly forbidden.  The extension '.cshtml' may be incorrect.   Please review the URL below and make sure that it is spelled correctly.

    Requested URL: /TCUCAdmin.cshtml


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212

     

    Should it be OK to add Web Page Razor V3   pages to Umbrac to 7.2 sites ?  If so how ?

    If not,  what is the best type of "non Umbraco ASP.NET page to add ?    I do not need Umbraco CMS  features but do need to be  able to use C# programming.

    Thanks

    Terry

  • Chris C 6 posts 46 karma points
    Dec 13, 2014 @ 09:02
    Chris C
    100

    Razor files are not served, what you're looking for in a .ASPX page.

    Or you could go down the route of Surface Controllers if you wish to do it in the MVC pattern - this should get you started: http://our.umbraco.org/documentation/Reference/Mvc/forms/turorial-partial-views

  • Terry Clancy 204 posts 944 karma points
    Feb 20, 2015 @ 01:11
    Terry Clancy
    0

    Hi all,

    I hae been happily using ASPX Web Forms when I needed to do testing on pages outside of the Umbraco framework.

    However I have now started using JavaScript to animate an image on a web form test page. The animation begins OK and runs through about 30 or 40 animation loops but always ultimately fails (between about 20 and 80 loops - it varies).

    I would appreciate if someone could explain why this is happening ? Also how is such processing handled differently being inside the

    tag of a Web Form?

    I am using ASP.Net WebForms because I am developing an Umbraco V7.18 site and wanted to develop some test pages "outside" of the Umbraco infrastructure and WebForms was recommended for that purpose. If there is a better choice for this please let me know.

    Thanks in anticipation.

    Terry Clancy

    ClanceZ

    Full Source Below:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TC_DivLayout.aspx.cs" Inherits="ClancyCom8.TC_DivLayout" %>
    

    <link href="/cssh/style_test.css" rel="stylesheet" type="text/css"/>
    
        <script type="text/javascript" language="Javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script language="JavaScript" type="text/javascript">
    
            var myimg = null;
            var animate;
            var newheight;
            var newleft;
    
            $( document ).ready( function() {
                var $body = $('body'); //Cache this for performance
                var $TTPage = $('TTPage'); //Cache this for performance
    
    
    
                myimg = document.getElementById('TTSlider1BoxTest');
    
    
                var setBodyScale = function () {
    
                        var curr_width = $body.width();
    
                        var scaleSource = curr_width;
                             scaleFactor = 0.1,                     
                             maxScale = 600,
                             minScale = 30; //Tweak these values to taste
    
                         var fontSize = scaleSource * scaleFactor; //Multiply the width of the body by the scaling factor:
    
                         if (fontSize > maxScale) fontSize = maxScale;
                         if (fontSize < minScale) fontSize = minScale; //Enforce the minimum and maximums
    
                         $('body').css('font-size', fontSize + '%');
                     }
    
                     $(window).resize(function(){
                         setBodyScale();
                     });
    
                     //Fire it when the page first loads:
                     setBodyScale();
    
                // Animate boxes when page first loads
                     //var myDiv1 = $("slideboxes1");
                     // var myDiv1 = document.getElementById("slideboxes1");
                     // var myBox2 = document.getElementById("TTSlider1Box1");
                     //myDiv1.animate({ left: '450px', width: '1000px', opacity: '0.5' }, "slow");
                // myBox2.animate({ left: '+=250px', width: '100px', opacity: '0.8' }, "slow");
    
                     function moveRight() {
                         // var myimg = $("#TTSlider1Box1");
                         newheight = parseInt(myimg.style.height) + 1 + 'px';
                         myimg.style.height = newheight;
                         // newleft = parseInt(myimg.style.left) + 1 + 'px';
                         // myimg.style.left = newleft;
                         animate = setTimeout(moveRight, 25); // call moveRight in 20msec
                     }
    
                     $("button").click(function () {
                         // $("div").animate({ right: '250px' },"slow");
                         // var myBox2 = $("TTSlider1Box1");
                         // myBox2.animate({ left: '450px', width: '1000px', opacity: '0.5' }, "slow");
                         // $("TTSlider1Box1").animate({ right: '250px' }, "slow");
                         myimg.style.height = 10 + 'px';
                         myimg.style.left = 600 + 'px';
                         moveRight();
    
    
                     });
    
                 });
    
        </script>
    


    Div Layout Test

      </form>
    

Please Sign in or register to post replies

Write your reply to:

Draft