sureshcd10 Posted May 24, 2004 Posted May 24, 2004 How can I create .dll files in .net and use it in my asp.net program I ve got a class file named MyClass with several generic functions in it I wanted to convert this MyClass into a .dll file How can I use this .dll file so that I can call/reuse my functions into my programs. :( :( Thank u Quote ima
wessamzeidan Posted May 24, 2004 Posted May 24, 2004 copy the dll to your bin directory and add a reference to it in your project... Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Jitesh Posted May 24, 2004 Posted May 24, 2004 Hi, >>How can I create .dll files in .net and use it in my asp.net program You can create Class Liabrary type project in Visula Studio. Add you code and compile. Your DLL is ready :) >>How can I create .dll files in .net and use it in my asp.net program Just add the reference of the dll in you asp.net project. And don't forget to add Import/Using directive at the top of Aspx page. HTH Quote Jitesh Sinha
georgepatotk Posted May 24, 2004 Posted May 24, 2004 I want create an inputbox into dll. my code is as following. I dont' know why I couldn't inherits System.Windows.Forms.Form Public Class InputBox Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub Public Sub New(ByVal Title As String, ByVal Message As String) MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call Me.Text = Title Me.lblMessage.Text = Message End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents btnAdd As System.Windows.Forms.Button Friend WithEvents lblMessage As System.Windows.Forms.Label Friend WithEvents btnCancel As System.Windows.Forms.Button Friend WithEvents txtValue As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.txtValue = New System.Windows.Forms.TextBox Me.btnAdd = New System.Windows.Forms.Button Me.lblMessage = New System.Windows.Forms.Label Me.btnCancel = New System.Windows.Forms.Button Me.SuspendLayout() ' 'txtValue ' Me.txtValue.Location = New System.Drawing.Point(32, 64) Me.txtValue.Name = "txtValue" Me.txtValue.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.txtValue.Size = New System.Drawing.Size(344, 20) Me.txtValue.TabIndex = 0 Me.txtValue.Text = "" ' 'btnAdd ' Me.btnAdd.DialogResult = System.Windows.Forms.DialogResult.OK Me.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnAdd.Location = New System.Drawing.Point(216, 96) Me.btnAdd.Name = "btnAdd" Me.btnAdd.Size = New System.Drawing.Size(80, 23) Me.btnAdd.TabIndex = 1 Me.btnAdd.Text = "Add" ' 'lblMessage ' Me.lblMessage.Location = New System.Drawing.Point(32, 8) Me.lblMessage.Name = "lblMessage" Me.lblMessage.Size = New System.Drawing.Size(344, 48) Me.lblMessage.TabIndex = 3 Me.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btnCancel ' Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnCancel.Location = New System.Drawing.Point(296, 96) Me.btnCancel.Name = "btnCancel" Me.btnCancel.Size = New System.Drawing.Size(80, 23) Me.btnCancel.TabIndex = 2 Me.btnCancel.Text = "Cancel" ' 'InputBox ' Me.AcceptButton = Me.btnAdd Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.CancelButton = Me.btnCancel Me.ClientSize = New System.Drawing.Size(408, 133) Me.ControlBox = False Me.Controls.Add(Me.btnCancel) Me.Controls.Add(Me.lblMessage) Me.Controls.Add(Me.txtValue) Me.Controls.Add(Me.btnAdd) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Name = "InputBox" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "InputBox" Me.ResumeLayout(False) End Sub #End Region Private theValue As String Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click theValue = txtValue.Text End Sub Public Function GetValue() As String GetValue = theValue End Function End Class Quote George C.K. Low
georgepatotk Posted May 24, 2004 Posted May 24, 2004 ok, I got the answer, I need to add references of System.Windows.Forms for inherit the method in the class. Thanks guy Quote George C.K. Low
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.