繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> Asp.Net开发 >> Calling a Button Event from a Compiled DLL

Calling a Button Event from a Compiled DLL

2007-07-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:'The Inherits Line calls the Namespace.Class inside the DLL Calling a Button Event from a compiled DLL Source VB File that gets compiled cpdll.vb file Option Strict Off Imports System Im...

'The Inherits Line calls the Namespace.Class inside the DLL

<%@ Page Language="VB" Inherits="ASPFreeS.MyCodeBehind" %>

Calling a Button Event from a compiled DLL

Source VB File that gets compiled

cpdll.vb file

Option Strict Off

Imports System

Imports System.DateTime

Imports System.Globalization

Imports System.Data

Imports System.Data.SQL

Imports System.Web.UI

Imports System.Web.UI.WebControls

Imports System.Web.UI.HTMLControls

Namespace ASPFreeS

Public Class MyCodeBehind : Inherits Page

Public Sub b1_Click(sender As Object , e As System.EventArgs)

dim value1 as string = "WOW the button was clicked!"

response.write(value1)

End Sub

End Class

End Namespace

Batch File to compile the DLL(This will place the dll in the /bin directory)

This creates an ASPfree.dll into the bin directory!

mk.bat file to compile the .vb file

vbc /t:library /out:..\bin\ASPfreebuttoneventdll.dll /r:System.Web.dll /r:System.dll

/r:System.Data.dll cpdll.vb

责任编辑:admin
相关文章