APNSoft.com - Web Controls, components for ASP.NET
 About Us 

Controls Suite
Version 4.5

What's New
Key Features
Quick Start
3 Easy Steps
Visual Studio Integration
Example Applications
Individual controls

APNSoft Controls Suite does not require special handlers, modules, application settings (Web.Config), etc. There are three main ways to add APNSoft control to an ASP.NET Web Page.
  1. Manually.
  2. From Visual Studio Toolbox (recommended).
  3. In Code Behind.

  1. Manually embedding a Control into the page.

    All you need to do is to add main dll library to your web application and write two lines of code on the WebForm:

    1. Copy the APNSoftControls.dll assembly into the Bin directory of your web application.

      By default, installer puts the APNSoftControls.dll in the folder:
      C:\Program Files\APNSoft Controls [Product_Version] for ASP.NET [NET_Version]\Bin\

    2. Add the following line of code to the top of your page:

      <%@ Register TagPrefix="APNSoft" Namespace="APNSoft.WebControls" Assembly="APNSoftControls" %>

    3. Add corresponding code anywhere within your page to embed the control. The common syntax is:

      <APNSoft:APNSoft[Control_Name] id="myID" runat="server" />

      The [Control_Name] is the name of control (Menu, DataGrid, TreeView, etc.).

      For example, the complete code for Menu:
      <APNSoft:APNSoftMenu id="myMenu" runat="server" />

      Or the code for DataGrid:
      <APNSoft:APNSoftDataGrid id="myDataGrid" runat="server" />

    Now you can open the page in your browser to see output.

  2. Adding a Control to your web application using Visual Studio.

    Make sure you have added APNSoft Controls to your Visual Studio Toolbox. Drag the component icon from the toolbox and drop it in your web form / user control. Visual Studio will automatically copy the APNSoftControls.dll assembly to the Bin folder of your web application and will add required code to the page. All of the properties are available via Properties Panel.

  3. Adding a Control programmatically (in Code Behind).

    For more programming flexibility you can use the built-in API of any APNSoft control. We recommend to use the PlaceHolder as a container to store dynamically added server controls on the Web page. The PlaceHolder is a standard Web Forms control.

    1. Copy the APNSoftControls.dll assembly into the Bin directory of your web application.
    2. Put the PlaceHolder somewhere on your Web page.
      <asp:PlaceHolder ID="PlaceHolder1" runat="server" />

    3. Put code in the Page_Load() procedure in Code Behind.

      protected void Page_Load(object sender, EventArgs e)
          //Create component instance
          APNSoft.WebControls.APNSoftMenu myMenu = new APNSoft.WebControls.APNSoftMenu();
          myMenu.BasePage = base.Page;
          myMenu.ID = "myMenu";
          //Set properties
          myMenu.StructureFileURL = "~/Structures/Menu.xml";
          myMenu.SkinFolder = "~/Skins/Classic/";
          //Add the control to PlaceHolder

      Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
          'Create component instance
          Dim myMenu As APNSoft.WebControls.APNSoftMenu = New APNSoft.WebControls.APNSoftMenu
          myMenu.BasePage = Me.Page
          myMenu.ID = "myMenu"
          'Set component properties
          myMenu.StructureFileURL = "~/Structures/Menu.xml"
          myMenu.SkinFolder = "~/Skins/Classic/"
          'Add the control to PlaceHolder
      End Sub


© 2003-2024 APNSoft. All rights reserved.    Terms of use.