Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have this code in the partial view:
<button class="stackedContent default" href="@item.Url" title="@item.Title" id="TestBtn" onclick="@UmbClientMgr.openModalWindow("mypage.aspx", "some title", true, 800, 600);">
and I'm getting error Compiler Error Message: CS0103: The name 'UmbClientMgr' does not exist in the current context
Compiler Error Message: CS0103: The name 'UmbClientMgr' does not exist in the current context
In the master page in the head I have the following links:
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script type="text/javascript" src="umbraco_client/Application/NamespaceManager.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoApplicationActions.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoUtils.js"></script> <script type="text/javascript" src="umbraco_client/Application/HistoryManager.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoClientManager.js"></script>
and before the end of the body i have the following scripts:
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script> <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"></script> <script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"></script> <script src=" ~/scripts/script.js"></script>
Am I missing some reference?
Please advise how do I make my code work
Hi Sonja,
Are you trying to use this code on the front end of your website ?
Dave
Hi Dave,
Yes all this code is on the front end, in the master page and in the partial view
The problem is that the code you are using depends on the backoffice.
All of these scripts are meant for the backoffice :
<script type="text/javascript" src="umbraco_client/Application/NamespaceManager.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoApplicationActions.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoUtils.js"></script> <script type="text/javascript" src="umbraco_client/Application/HistoryManager.js"></script> <script type="text/javascript" src="umbraco_client/Application/UmbracoClientManager.js"></script>
So they will not work in your front end.
Maybe you can explain what you are trying to achieve and we can find a solution for that.
I'm trying to do a modal popup that will load url
hi Sonja,
I think you need a plugin for that.
But I don't know what you are using for client side scripting.
If you are using jQuery a google search on jQuery Modal will give you enough examples/plugins to get this done.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
The name 'UmbClientMgr' does not exist in the current context
Hi,
I have this code in the partial view:
and I'm getting error
Compiler Error Message: CS0103: The name 'UmbClientMgr' does not exist in the current context
In the master page in the head I have the following links:
and before the end of the body i have the following scripts:
Am I missing some reference?
Please advise how do I make my code work
Hi Sonja,
Are you trying to use this code on the front end of your website ?
Dave
Hi Dave,
Yes all this code is on the front end, in the master page and in the partial view
Hi Sonja,
The problem is that the code you are using depends on the backoffice.
All of these scripts are meant for the backoffice :
So they will not work in your front end.
Maybe you can explain what you are trying to achieve and we can find a solution for that.
Dave
I'm trying to do a modal popup that will load url
hi Sonja,
I think you need a plugin for that.
But I don't know what you are using for client side scripting.
If you are using jQuery a google search on jQuery Modal will give you enough examples/plugins to get this done.
Dave
is working on a reply...