-
EXT.net.dll in VS2010
Hi,
I am new to coolite, and we are a team of 7 assigned to test ERP applications with HTML5 and mvc, and extjs library, we try to use coolite, but can never add tags like <Items><content><canvas> etc inside panels...only that <body> tag which not a good HTML code, always getting the error Can not be a public property tag...
What is it that we should do to get EXT.NET.DLL to work properly?
and what is the proper way/ways to structure the HTML in coolite?
Thanks a million in advance.
-
Hi amexus,
I tried the following sample with a <canvas> script and it appears to work correctly.
Example
Code:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Canvas Test</title>
<ext:ResourcePlaceHolder runat="server" />
<!--[if IE]><script src="excanvas.js"></script><![endif]-->
<script type="text/javascript">
Ext.onReady(function () {
var drawingCanvas = document.getElementById('myDrawing');
// Check the element is in the DOM and the browser supports canvas
if (drawingCanvas && drawingCanvas.getContext) {
// Initaliase a 2-dimensional drawing context
var context = drawingCanvas.getContext('2d');
// Create the yellow face
context.strokeStyle = "#000000";
context.fillStyle = "#FFFF00";
context.beginPath();
context.arc(100,100,50,0,Math.PI*2,true);
context.closePath();
context.stroke();
context.fill();
// Add 2 green eyes
context.strokeStyle = "#000000";
context.fillStyle = "#FFFFFF";
context.beginPath();
context.arc(80,80,8,0,Math.PI*2,true);
context.closePath();
context.stroke();
context.fill();
context.fillStyle = "#009966";
context.beginPath();
context.arc(80,80,5,0,Math.PI*2,true);
context.closePath();
context.fill();
context.strokeStyle = "#000000";
context.fillStyle = "#FFFFFF";
context.beginPath();
context.arc(120,80,8,0,Math.PI*2,true);
context.closePath();
context.stroke();
context.fill();
context.fillStyle = "#009966";
context.beginPath();
context.arc(120,80,5,0,Math.PI*2,true);
context.closePath();
context.fill();
// Create the diamond-shaped nose
context.fillStyle = "#000000";
context.beginPath();
context.moveTo(93,100);
context.lineTo(100,93);
context.lineTo(107,100);
context.lineTo(100,107);
context.closePath();
context.fill();
// Add the smile
context.strokeStyle = "#000000";
context.beginPath();
context.moveTo(70,110);
context.quadraticCurveTo(100,150,130,110);
context.quadraticCurveTo(100,150,70,110);
context.closePath();
context.stroke();
}
});
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Window
runat="server"
Title="Hello Canvas World"
Height="210"
Width="210">
<Content>
<canvas id="myDrawing" width="200" height="200">
<p>Your browser doesn't support canvas.</p>
</canvas>
</Content>
</ext:Window>
</form>
</body>
</html>
Hope this helps.
-
1 Attachment(s)
Here's a screen capture of the sample above.
-
You can download the public v1.0 Preview Release from the following location, see
http://forums.ext.net/showthread.php...on-1.0-Preview
-
I should also mention, the <canvas> sample came from the following "How to Draw with HTML 5 Canvas" blog post, see
http://thinkvitamin.com/dev/html-5-d...html-5-canvas/
Hope this helps.
-
Thanks very Much for the example and the resources, I have tried them in a standalone project and it works fine, yet when using MVC in vs2010, we get errors, so my guess is it is a problem in setting up the environment, is there like a resource or guidleines for how things should be in vs2010, I have read many posts about it but not much in terms of solutions.
again thanks a lot, really appreciate your effort.
-
Hi amexus,
Does even the simplest of Ext.NET pages/views render? say, a page with just a ResourceManager and Window?