How to create assembly in VB.NET

In this article you learned that how you can create assembly.
  • 5027


An Assembly is the building block of a .net application. It is a self describing collection of code, resources, metadata. An Assembly is a compiled and versioned collection of code and metadata that forms an atomic functional unit. Assembly takes the form of a Dynamic Link Library (.dll) or Executable program file (.exe) but they differ as they contain the information found in a type library and the information about everything else needed to use an application or component.

Steps for creating an assembly

  • Create a (web/windows/console/class Library) project in 
  • Then add your code as we add below. 
  • Add the below code in your Default.aspx page.

    <%@ Page Title="Home Page" Language="vb" AutoEventWireup="false"
        CodeBehind="Default.aspx.vb" Inherits="bulletedlist._Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    html xmlns="">
    head id="Head1" runat="server">
        <title>How to Use BulletedList and Bullet Style Property</title>
        <form id="form1" runat="server">
        <div style="width: 478px">   
    <asp:BulletedList ID="BulletedList1" runat="server">
                <asp:ListItem>Lesson 1</asp:ListItem>
                <asp:ListItem>Lesson 2</asp:ListItem>
                <asp:ListItem>Lesson 3</asp:ListItem>
                <asp:ListItem>Lesson 4</asp:ListItem>
                <asp:ListItem>Lesson 5</asp:ListItem>
            <br />
            Bullet Style<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
            <br />
  • Then write the code for the code behind file.

    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles
    If DropDownList1.Text = "Numbered" Then
                BulletedList1.BulletStyle = BulletStyle.Numbered
    ElseIf DropDownList1.Text = "Circle" Then
                BulletedList1.BulletStyle = BulletStyle.Circle
    ElseIf DropDownList1.Text = "Square" Then
                BulletedList1.BulletStyle = BulletStyle.Square
    ElseIf DropDownList1.Text = "LowerRoman" Then
                BulletedList1.BulletStyle = BulletStyle.LowerRoman
    ElseIf DropDownList1.Text = "UpperAlpha" Then
                BulletedList1.BulletStyle = BulletStyle.UpperAlpha
    ElseIf DropDownList1.Text = "UpperRoman" Then
                BulletedList1.BulletStyle = BulletStyle.UpperRoman
    End If
        End Sub
  • Now compile your application by choosing Build from the menu. 
  • When you build the application you will find a bin directory under your Root directory. The bin directory will contain a(.dll file )this .dll file is called the ASSEMBLY.

    You can see the assembly in attachment.


In this article you learned that how to create assembly. 


More Articles

© 2020 DotNetHeaven. All rights reserved.