Hello! I am using Visual Studio 2010, I am a total newbie to ASP.Net and I am having trouble successfully adding the FreeTextBox component to my project. I am only trying to add it to a simple Hello World-esque project called WebApplication1, and I can't even get that to work. I have successfully added the bin/freetextbox.dll file to my solution, and I successfully added the FreeTextBox component to the Toolbox, but when I drag it in Design view and try to run it, I get build errors. Please help!
1. I go to http://freetextbox.com/download/ and download the latest stable version of the software, which is "Download Control (3.2.4) (zip)."
2. I extract the .zip file to c:\download\FTBv3-2-4.
3. I launch Visual Studio 2010 and create a new project by going to File -> New Project.
4. In the Visual Basic tab, I click "ASP.NET Web Application." I accept the default name WebApplication1 and Solution name WebApplication1 and the location is C:\VISUALSTUDIO.
5. I click OK and this creates my project.
6. I click the green arrow button to compile and run my program. This creates a nice simple "Welcome to ASP.NET!" webpage on localhost, and so far everything is OK.
7. Now it's time to add the FreeTextBox. I go to the directory where I extracte the .zip file (c:\download\FTBv3-2-4). I am using .NET 4.0, so I double-click on the Framework-3.5 folder and copy FreeTextBox.dll. I paste this file inside my project's bin folder (C:\VISUALSTUDIO\WebApplication1\WebApplication1\bin).
8. In Visual Studio I go to the Solution Explorer and right-click WebApplication1 and click on "Add Reference..." The Add Reference screen pops up.
9. I click on the Browse tab, navigate to C:\VISUALSTUDIO\WebApplication1\WebApplication1\bin, select FreeTextBox.dll, and click OK.
10. In Solution Explorer, I double-click on web.config.
11. In web.config, I add the following block of code right after the <system.web> line:
<httpHandlers><add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" /></httpHandlers>
12. In my main .aspx page (Default.aspx), I add the following line right after the <%@ Page Title="Home Page" Language="vb" ... > line:
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
13. I copy the FreeTextBox folder from my .zip file (C:\download\FTBv3-2-4\aspnet_client\FreeTextBox) and paste it into my project folder (c:\VISUALSTUDIO\WebApplication1\WebApplication1).
14. Now I try to use an actual FreeTextBox component. I go to my Default.aspx page, and I paste the following block of code after the last </p> but before </asp:Content>:
<FTB:FreeTextBox ID="FreeTextBox1" Focus="true" SupportFolder="FreeTextBox/" JavaScriptLocation="ExternalFile" ButtonImagesLocation="ExternalFile" ToolbarImagesLocation="ExternalFile" ToolbarStyleConfiguration="OfficeXP" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu, FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold, Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft, JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent; CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu, StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable; InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow; InsertTableColumnAfter,InsertTableColumnBefore, DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton, InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle, InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell" runat="Server" GutterBackColor="red" DesignModeCss="designmode.css" ButtonSet="Office2000" />
15. I go to Build -> Build WebApplication1 and I get the error I described in the above post ("Error 1 'Could not load file or assembly 'FreeTextBox, Version=3.2.4.41247, Culture=neutral, PublicKeyToken=5962a4e684a48b87' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)' c:\VISUALSTUDIO\WebApplication1\WebApplication1\LC WebApplication1")"
Then I remove the same block of code I added in step 14 and I still get the same error.
Two questions:
1. What am I doing wrong?
2. Why am I getting the build error even after I remove the <FTB... /> block of code from step 14 and rebuild?