ARTICLE

How to create assembly in VB.NET

Posted by Dea Saddler Articles | Assemblies in VB.NET May 11, 2011
In this article you learned that how you can create assembly.
Download Files:
 
Reader Level:


Introduction

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 programe 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 vs.net. 
  • 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head id="Head1" runat="server">
        <title>How to Use BulletedList and Bullet Style Property</title>
    </
    head>
    <
    body>
        <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>
            </asp:BulletedList>
            <br />
            Bullet Style<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                <asp:ListItem>Numbered</asp:ListItem>
                <asp:ListItem>Circle</asp:ListItem>
                <asp:ListItem>Square</asp:ListItem>
                <asp:ListItem>LowerRoman</asp:ListItem>
                <asp:ListItem>UpperAlpha</asp:ListItem>
                <asp:ListItem>UpperRoman</asp:ListItem>
            </asp:DropDownList>
            <br />
        </div>
        </form>
    </
    body>
    </
    html>
     
  • Then write the code for the code behind file.

       
    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles
        DropDownList1.SelectedIndexChanged
           
    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 assembly.zip attachment.


Summary

In this article you learned that how to create assembly. 

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor