|
Getting Started |
Top Previous Next |
|
DbNetSuite is a suite of AJAX enabled ASP.NET controls that can be used in the creation of database aware web applications. Adding DbNetSuite to Visual Studio To add DbNetSuite to the Visual Studio toolbox follow these steps:
Using DbNetSuite in Visual Studio To use DbNetSuite in Visual Studio simply drag one of the DbNetSuite control icons from the toolbox onto the design window and specify the ConnectionString and FromPart properties in the Properties window. The following web.config settings relate to DbNetSuite The following HttpHandlers must be added to your application web.config file IIS 6
<configuration>
...
<system.web>
...
<httpHandlers>
<add verb="*" path="dbnetgrid.ashx" type="DbNetLink.DbNetSuite.DbNetGrid" validate="false"/>
<add verb="*" path="dbnetedit.ashx" type="DbNetLink.DbNetSuite.DbNetEdit" validate="false"/>
<add verb="*" path="dbnetfile.ashx" type="DbNetLink.DbNetSuite.DbNetFile" validate="false"/>
<add verb="*" path="dbnetspell.ashx" type="DbNetLink.DbNetSuite.DbNetSpell" validate="false"/>
<add verb="*" path="dbnetcombo.ashx" type="DbNetLink.DbNetSuite.DbNetCombo" validate="false"/>
<add verb="*" path="dbnetlist.ashx" type="DbNetLink.DbNetSuite.DbNetList" validate="false"/>
<add verb="*" path="dbnetsuite.js.ashx" type="DbNetLink.DbNetSuite.JS" validate="false"/>
<add verb="*" path="dbnetsuite.css.ashx" type="DbNetLink.DbNetSuite.CSS" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
...
</system.web>
...
</configuration>
IIS 7
<configuration>
...
<system.webServer>
....
<handlers>
<add name="dbnetgrid_ashx" verb="*" path="dbnetgrid.ashx" type="DbNetLink.DbNetSuite.DbNetGrid"/>
<add name="dbnetedit_ashx" verb="*" path="dbnetedit.ashx" type="DbNetLink.DbNetSuite.DbNetEdit"/>
<add name="dbnetfile_ashx" verb="*" path="dbnetfile.ashx" type="DbNetLink.DbNetSuite.DbNetFile"/>
<add name="dbnetspell_ashx" verb="*" path="dbnetspell.ashx" type="DbNetLink.DbNetSuite.DbNetSpell"/>
<add name="dbnetcombo_ashx" verb="*" path="dbnetcombo.ashx" type="DbNetLink.DbNetSuite.DbNetCombo"/>
<add name="dbnetlist_ashx" verb="*" path="dbnetlist.ashx" type="DbNetLink.DbNetSuite.DbNetList"/>
<add name="dbnetsuite_js_ashx" verb="*" path="dbnetsuite.js.ashx" type="DbNetLink.DbNetSuite.JS"/>
<add name="dbnetsuite_css_ashx" verb="*" path="dbnetsuite.css.ashx" type="DbNetLink.DbNetSuite.CSS"/>
</handlers>
<modules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
....
</system.webServer>
...
</configuration>
To connect DbNetSuite to your database you must add a connection to the connectionStrings section of the application web.config file. For more information on supported databases and data providers click here This property must be set if you want to enable the HTML editor. The property should be set to the the virtual path of the TinyMCE folder Specifies if the culture should be taken from the "client" or "server". The culture determines amongst other things how date and currency values are displayed and validated. The ID of the license. Not required for evaluations. The DbNetSuite license key. If set to "true" will not include the jQuery library automatically. Use this option when the jQuery library is already available in the page. DbNetSuite requires at least version 1.3 of jQuery. If set to "true" will suppress the the jQuery $ method so that it can be used by a different library. If set to "true" will encode all output from the components using the Microsoft Anti-Cross Site Scripting Library If set to "true" will use a server generated token to verify the validity of the request submitted to DbNetSuite from the users application. We recommend setting this option to true as it provides an additional layer of security for your applications specifically to combat CSRF (cross-site request forgery) attacks. If you are running a client-side implementation of a DbNetSuite control then you must also include the user token by adding the line highlighted below. <html> Note that the line must follow the inclusion of the DbNetSuite client-library <script type="text/javascript" src="dbnetsuite.js.ashx"></script>
if you are running the server-control implementation of DbNetSuite the token is included automatically. |