Forum

Post Reply
Forum Home > Public > Install and Setup Guide for Extjs Visual Studio

imomins
Site Owner
Posts: 7

Hi everyone. I have been spending the day working with Ext.Net and so far I am loving it. I have been looking for something like this for over a year now and am excited to get started with it.

I wanted to give back by sharing my experience with setting up and installing Ext.Net with Visual Studios. I had noticed that there weren’t really any step by step instructions for people who are new to .Net and thought I would try to help out by adding this guide on how to start using Ext.Net within your project. Hopefully this will help out someone if they are get getting started with ASP.Net

This is the setup I used for installing and setting up Ext.Net within Visual Studios 2010. I have tested it with the .net 4.0 framework and have not had any problems.

To start you will need to download the latest version.Unzip the contents of the zip file into a new directory.Open the directory and copy the following files to your projects /bin directory:12345Ext.Net.dllExt.Net.Utilities.dllExt.Net.xmlNewtonsoft.Json.dllNewtonsoft.Json.xmlIn the solution explorer make sure the view all files button is selected.Expand the /bin directory to display all files and Click the refresh button at the topselect each of the new files you just added to the /bin directory (shift + click)Right click and choose “Include in Project”Add references to Ext.Net

In solution Explorer Click the properties button for your project (top left button).Click on References tab on the left. You should see all references in the center.Click the Add button and then the browse tab.Browse to your projects /bin directory (were you copied the DLL’s to) and select the 3 DLL’s and click ok.Under Imported namespaces scroll to the bottom and click on the checkboxes for the following:

*Note: Include which ever ones you plan to use.12345ExtExt.NetExt.Net.UtilitiesNewtonsoftNewtonsoft.JsonSave your project.Web.config changes

Open your web.config file. You will need to add the following to your config file.Find:

12<configuration> <configSections>Add:

1<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />Depending on which version of IIS you will be deploying to you will need to add one of the following.

If you deploy to different versions of IIS (Different IIS versions in development, staging, live for example) add both. If unsure add both.

1234567891011121314151617181920212223242526272829303132333435363738<extnet /> <!-- The following system.web section is only requited for running ASP.NET AJAX under Internet Information Services 6.0 (or earlier).  This section is not necessary for IIS 7.0 or later. --> <system.web> <httpHandlers> <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" /> </httpHandlers> <httpModules> <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" /> </httpModules> </system.web> <!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" /> </modules> <handlers> <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" /> </handlers> </system.webServer>Add Ext.Net to your toolbox.

Open a .aspx file to exit in visual studios. We do this so items are displayed within your toolbox (if its a .vb, .cs, etc it will not display items).Next click on your toolbar and click add tab. Name this tab something (Ext.Net)Right click under this tab click choose itemsClick the Browse button under “.NET Framework Components”If no errors are displayed you should now see all the components under the new tab.I suggest going though and creating several new tabs to help sort and group the 100+ controls that are now added. Ext.net Forms, Ext.net Data, Ext.net Design are some examples I use.

Testing within your project:

Before you begin I would suggest doing a Build Clean and Rebuild to confirm all the new changes are set.

To use Ext.Net within your page requires 2 changes to an existing page. A register tag and the resourcemanager tag.

Open a file within your project (or create a new file – right click project name > add > New item).At the top of your page (under the page directive) add:1<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>This will give you access to the Ext.Net DLL

Next find your BODY tag and add the following BELOW it:1<ext:ResourceManager ID="ResourceManager1" runat="server" />Finally we will test that Ext.Net is fully working by using a simple control. Copy & paste the following into your page somewhere within the BODY tag:12345678910<ext:CycleButton ID="CycleButton1" runat="server" ShowText="true" PrependText="View As "> <Menu> <ext:Menu ID="Menu1" runat="server"> <Items> <ext:CheckMenuItem ID="CheckMenuItem1" runat="server" Text="Text Only" Icon="Note" /> <ext:CheckMenuItem ID="CheckMenuItem2" runat="server" Text="Html" Icon="Html" Checked="true" /> </Items> </ext:Menu> </Menu> </ext:CycleButton>Save your .aspx file, build and run the page (ctrl + F5)You should now see the control displayed on the page. If it is not installed there was a problem somewhere with your install. You should see some type of error directing you on how to solve the problem.Problems, errors and issues:

Here are some common problems you may run into and how to solve the problems.

Question: Ext.Net tools are not displayed in the toolbar?

Answer: Make sure you are editing a .aspx file. If other tools are displayed but not Ext.Net then you may not have added the dll correctly.

Question: The ResourceManager Control is missing from this Page.

Answer: You did not add the ResourceManager to your page. Add the following tag UNDER your <body> tag: <ext:ResourceManager ID=”ResourceManager1″ runat=”server” />

Question: Parser Error Message: Unknown server tag ‘ext:ResourceManager’.

Answer: Add the following under your page directive (under the <@Page tag):

1<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>Question: “The web.config file for this project is missing the required DirectRequestModule.”

Answer: You did not update your web.config file, did not rebuild your project, or you have more then 1 reference to the <system.web> or <system.webserver> tags.

Everything worked on your local / dev machine but not dev/staging/live server

Answer: Confirm the DLL’s exist on the other server and that the server has the updated web.config file.

 


--

MD. MOMINUL ISLAM

[email protected]

July 12, 2011 at 11:10 AM Flag Quote & Reply

You must login to post.