Below you can see a simple example of how to integrate a Polymer element (core-toolbar here) into an ASP.NET Webforms page. Note that the import lines are included in the element.
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="TestPolWebApp._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<link rel="import" href="Scripts/Polymer/polymer/polymer.html">
<link rel="import" href="Scripts/Polymer/core-toolbar/core-toolbar.html">
<script src="Scripts/Polymer/webcomponentsjs/webcomponents-lite.js"></script>
<div class="jumbotron">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS, and JavaScript.</p>
<p><a href="http://www.asp.net" class="btn btn-primary btn-lg">Learn more »</a></p>
</div>
<p> Polymer test: </p>
<core-toolbar style="border-radius:4px; display:inline-block";>
<span class="glyphicon glyphicon-bookmark"></span>
<span>Example of use of Polymer element in simple aspx page</span>
</core-toolbar>
<div class="row">
<div class="col-md-4">
<h2>Getting started</h2>
<p>
ASP.NET Web Forms lets you build dynamic websites using a familiar drag-and-drop, event-driven model.
A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access.
</p>
<p>
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkId=301948">Learn more »</a>
</p>
</div>
</div>
</asp:Content>
Result:
How to add source code to a blog post in blogger? Just check: http://www.coding-issues.com/2013/10/copy-code-from-visual-studio-to-blogger.html
BeantwoordenVerwijderenThere's also a version for VS2017 available.