How to implement Mapping by using Kendo map? - c#

I was trying to add kendo Map, i added necessary css and script files but i am not getting #(Html.Kendo().Map() i am getting all other widgets like splitter ,slider ,grid but no Map.
What would be the reason any guess?
Added files and dll shown below
<link href="~/Content/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo.default.min.css" rel="stylesheet" />
<link href="~/Content/kendo.dataviz.default.min.css" rel="stylesheet" />
<link href="~/Content/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery.min.js"></script>
<script src="~/Scripts/kendo.all.min.js"></script>
<script src="~/Scripts/kendo.aspnetmvc.min.js"></script>
#using Kendo.Mvc.UI;
EDIT
It seems Map is not supported in kendo or some .js sequence i am missing or something overriding?

Related

Page not reading CSS files for some ungodly reason

Ok, so I recently had an SEO audit done on my site and per the recommendations I added the Geo.txt, robots.txt, Schema.txt and sitemap.xml files to my root directory (not sure exactly if this is where these files go...) And now for some reason my page displays like there is no CSS file at all. Could adding one of these files affect that? Do I need to add the path to my CSS to one of the files? I will add my header section below.
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L6BBJ36NQR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-L6BBJ36NQR');
</script>
<asp:ContentPlaceHolder ID="contentHead" runat="server">
</asp:ContentPlaceHolder>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="Web Development Erie PA Application Custom Software Northwest PA" />
<link rel="manifest" href="site.webmanifest" />
<link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.ico" />
<!-- CSS here -->
<link href="" rel="stylesheet" />
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="assets/css/owl.carousel.min.css" />
<link rel="stylesheet" href="assets/css/slicknav.css" />
<link rel="stylesheet" href="assets/css/flaticon.css" />
<link rel="stylesheet" href="assets/css/progressbar_barfiller.css" />
<link rel="stylesheet" href="assets/css/gijgo.css" />
<link rel="stylesheet" href="assets/css/animate.min.css" />
<link rel="stylesheet" href="assets/css/animated-headline.css" />
<link rel="stylesheet" href="assets/css/magnific-popup.css" />
<link rel="stylesheet" href="assets/css/themify-icons.css" />
<link rel="stylesheet" href="assets/css/slick.css" />
<link rel="stylesheet" href="assets/css/nice-select.css" />
<link rel="stylesheet" href="assets/css/style.css" />
</head>
The page is supposed to look like this:
Proper site look
But instead it looks like this:
Wrong site look

Environment Tag Helper in .NET Core

I just create a .net core 2.0 project on my visual studio and found in _Layout.cshtml few new properties like called- "environment". I worked on MVC5 but there was no such properties. What these propertie does? Is it replacement of Rezor Syntax which i used in MVC5 view? Please provide details with doc for use those properties to get started with those.
_Layout.cshtml:
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
We have 3 Environments; Development, Staging and Production.
This tag helper help us to render what we need in different environments.
the code below means that, if we are in DEVELOPMENT environment, render this css files.
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
and the code below means that render the content when we are NOT in DEVELOPMENT environment.
<environment exclude="Development">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
*note: asp-fallback-href in code above means if can't connect to cdn, go and use minified bootstrap file from server!
also you can write code above like this:
<environment include="Staging, Production">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
that means render the content if we are in STAGING or PRODUCTION environments.
The environment tag helper uses the value of IHostingEnvironment.EnvironmentName to include/exclude content in the DOM (Document Object Model) based on the current application environment.
In your snippet, the first two style sheets are included when running your code in a development environment, and the bottom two are excluded when in development environment.
See Microsoft docs on Tag Helper in ASP.NET Core and Environment Tag Helper , which could help more clearly to answer your question.
The Environment Tag Helper conditionally renders its enclosed content based on the current hosting environment.
The include attribute basically means render the code whether you're in Development environment, while it won't be rendered with exclude attribute.

In framework web2UI can't select or edit rows

In my header I use
<link rel="stylesheet" type="text/css" href="http://w2ui.com/src/w2ui-1.4.3.min.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="http://w2ui.com/src/w2ui-1.4.3.min.js"></script>
But if I add by toolbar new row - all working good !
Framework web2ui required in grid as id field with name "recid", but I made mistake and send data with field "recID" ...

MVC4 Bundle with a Custom-Attribute on Link-Element

I'm using System.Web.Optimization.Bundle to bundle all my stylesheets. Is there a way to extend the Bundle Class to include custom attributes to get a following output?
<link href="/Content/Css/view.css" rel="stylesheet" data-class="en"/>
Here in the link element is the data-class="en" included:
bundles.Add(new CustomStyleBundle("~/bundles/css").Include("~/content/css/en/view.css"));
mvc4 bundle, how it is working?
Can be include it like this. No need to create a custom bundle.
<link href="#System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" />

Cannot use a leading .. to exit above the top directory

I'm getting this error when I start my project
It is being caused by the css and js files in the master page.
<link href="../assets/css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
When I remove this line the project starts functioning correctly(without the style)
Any ideas
Sp
Since this is ASP.NET, use a tilde ~ to mark the application root:
<link href="~/assets/css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />

Categories