Try Now
More in this section

Forums / Developing with Sitefinity / Could not load user control when try to drag it on sitefinity backend page.

Could not load user control when try to drag it on sitefinity backend page.

2 posts, 0 answered
  1. rupali
    rupali avatar
    14 posts
    08 Mar 2016
    19 Mar
    Link to this post

    Hello Sir,

                I have created user control to display success message after subscription which contains subscribe code(add user email to database) on page load.Register it (RegisterSettings.png) on sitefinity . After created page and when try to drag MsgTemplate control on my page, it displays error could not load user control(erroronPage.png).and another error is as shown in image error.png Unable to understand why this error occur.Plz help me .Below is my user control markup

    Thanks in advance.


    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="thanks-you.ascx.cs" Inherits="SitefinityWebApp.UserControls.thanks_you" %>
    <html lang="en">

     <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
      <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.css" rel="stylesheet" />
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>

          function showMessageBox1(msg) {
            var dvMessageBox = document.getElementById('dvMessageBox1');
            var dvBack = document.getElementById('dvMessageBoxBack1');

            //var screenHeight = $(window).height(); // window.screen.height;
            var screenHeight = screen.height;
            var screenWidtht = $(window).width();

            dvMessageBox.style.display = "";
            dvBack.style.display = "";
            //dvBack.style.height = document.documentElement.scrollHeight + 'px';
            dvBack.style.height = (screen.height + 350) + 'px';

            var dvwidth = parseInt(dvMessageBox.children[0].offsetWidth);
            if (dvwidth == 0 || dvwidth == "NaN") {
                dvwidth = 650;

            dvMessageBox.style.left = (screenWidtht / 2) - (dvwidth / 2) + 'px';
            // dvMessageBox.style.top = (screenHeight / 2) - (dvMessageBox.offsetHeight / 2) + 'px';
            dvMessageBox.style.top = (screenHeight / 2) + 'px';
            if (parseFloat(dvMessageBox.style.top) > 400)
                dvMessageBox.style.top = 375 + 'px';
            if (dvMessageBox.style.left > 450)
                dvMessageBox.style.left = 300 + 'px';
            document.getElementById('lblMessage1').innerHTML = msg;



    <div class="dvsignup">

        <div class="row dvrw">
            <div class="dvform" id="dvform">
                 <a href="https://testwebsiteredesign.mywealthtrace.com/">
                <img alt="logo" class="logoImg" src="/Sitefinity/WebsiteTemplates/WealthTraceNew/App_Themes/WealthTraceNewTheme/img/logo----1.png" /></a>
            <div class="dv12txtLR">




  2. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    27 Oct 2016
    22 Mar
    Link to this post

    Most likely the dash in the tagname attribute (TagName="thanks-you" ) is causing this parse error.
    Please try to modify and register the control without the dash in the tagname and retest.
    If the problem persists please upload all your custom control files with some repro steps in order for us to examine and test.

    Dimitri Cools
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered