Could not load user control when try to drag it on sitefinit

Posted by Community Admin on 04-Aug-2018 05:29

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

All Replies

Posted by Community Admin on 19-Mar-2016 00:00

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">
<head><title></title>

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

    <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;
        </script>

   

</head>

<body>
<div class="dvsignup">

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

 

Posted by Community Admin on 22-Mar-2016 00:00

Hi,

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.

Regards,
Dimitri Cools
Telerik
 
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
 

This thread is closed