EXT.net.dll in VS2010

  1. #1

    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.
  2. #2
    Hi amexus,

    I tried the following sample with a <canvas> script and it appears to work correctly.

    Example

    <%@ 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.
    Geoffrey McGill
    Founder
  3. #3
    Here's a screen capture of the sample above.
    Attached Thumbnails Click image for larger version. 

Name:	canvas_sample.jpg 
Views:	176 
Size:	12.2 KB 
ID:	1425  
    Geoffrey McGill
    Founder
  4. #4
    You can download the public v1.0 Preview Release from the following location, see

    http://forums.ext.net/showthread.php...on-1.0-Preview
    Geoffrey McGill
    Founder
  5. #5
    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.
    Geoffrey McGill
    Founder
  6. #6
    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.
  7. #7
    Hi amexus,

    Does even the simplest of Ext.NET pages/views render? say, a page with just a ResourceManager and Window?
    Geoffrey McGill
    Founder

Similar Threads

  1. How to use Ext.NET Beta with VS2010 .NET3.5
    By Mr.Techno in forum 2.x Help
    Replies: 0
    Last Post: May 29, 2012, 8:56 AM
  2. Go To Definition in VS2010
    By tallman in forum 1.x Help
    Replies: 0
    Last Post: Dec 28, 2011, 2:28 PM
  3. VS2010 and ExtJS Intellisense
    By Wellington Caetano in forum 1.x Help
    Replies: 2
    Last Post: Jun 07, 2011, 1:37 PM
  4. VS2010 + ASP.NET MVC + Ext.NET
    By peter.campbell in forum 1.x Help
    Replies: 4
    Last Post: Jan 20, 2011, 2:12 PM
  5. Vs2010 Beta 2: "ext not recognized"
    By fabiomarcos in forum 1.x Help
    Replies: 5
    Last Post: Dec 03, 2009, 5:27 AM

Posting Permissions