[ת]ʹÓÃASPµ÷ÓÃC#дµÄCOM×é¼þ
ת×Ô: http://www.cnblogs.com/rentj1/archive/2009/02/23/1396187.html
1 н¨Àà¿âMyTestDLL
2 ÓÒ»÷ÏîÄ¿“MyTestDLL”-¡·ÊôÐÔ-¡·Éú³É-¡·¹´Ñ¡“ΪCOM»¥²Ù×÷×¢²á”
3 ´ò¿ª AssemblyInfo.cs Îļþ ÐÞ¸Ä [assembly: ComVisible(true)]
4 ´ò¿ªVisual Sutdio 2008 µÄÃüÁîÌáʾÐй¤¾ßÊäÈëguidgen.exe Ñ¡ÔñDEFINE_GUID µ¥»÷ "New GUID"
5´úÂë
1¡¢Ã¿¸öÀàÃû¶ÔÓ¦Ò»¸ö½Ó¿ÚÃû£¬½Ó¿ÚÃûÊÇÀàÃûǰ¼ÓÉÏÒ»¸ö´óдµÄI
2¡¢½Ó¿ÚÖÐÉùÃ÷µÄ·½·¨ÒªÊ¹ÓÃÊôÐÔ [DispId(n)]
3¡¢Àà±ØÐëÓÐÒ»¸öÎ޲ι¹Ô캯Êý
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace MyTestDll
{
// ÕâÀïGuidΪµÚ4²½Éú³ÉµÄ¡£
[Guid("FFA4B191-FB5B-4dd5-B7B1-B2F32BF6F1FF")]
public interface IMyTestDll
{
[DispId(0)]
string GetAbout();
}
public class Test1:IMyTestDll
{
private string summary;
public Test1()
{
summary = "ÕâÊÇÎҵĵÚÒ»¸ö²âÊÔ";
}
public string GetAbout()
{
return summary;
}
}
}
6 Éú³ÉÏîÄ¿
ASP²âÊÔ´úÂë
<%
Dim o &nbs
Ïà¹ØÎĵµ£º
Perl¡¢PHP¡¢ASP¡¢JSP¼¼Êõ±È½Ï
±¾ÎĽ«¶ÔĿǰ×î³£ÓõÄËÄÖÖ¶¯Ì¬ÍøÒ³ÓïÑÔPerl£¨Practical Extraction and Report Language£©¡¢PHP£¨Hypertext Preprocessor£©¡¢ASP£¨Active Server Pages£©¡¢JSP£¨JavaServer Pages£©½øÐÐһЩ¼¼ÊõÐԵıȽϡ£
¡¡¡¡Perl
¡¡¡¡Perl£¨Practical Extraction and Report Language£©ÊÇÒ»ÖֺܹÅÀϵĽű ......
×î½ü×öÒ»¸öÍøÕ¾£¬¸ÃÍøÕ¾ÐèÒªÌí¼Ó4000¶à ²úÆ·ÐÅÏ¢£¬Èç¹ûÓÃÈ˹¤·½·¨È¥±ðµÄÍøÕ¾copyÄÇÖÁÉÙÒª»¨·Ñ°ëÔÂʱ¼ä²ÅÄÜÍê³É£¬ËùÒÔÎÒ¸ö°ì·¨Ê¹ÓÃc#×÷³öÀ´ÁËÒ»¸öÍøÒ³Êý¾Ý²É¼¯Èí¼þ
Ïêϸ³ö´¦²Î¿¼£ºhttp://www.jb51.net/article/21468.htm
//ÌáÈ¡²úÆ·ÁбíÒ³ÖвúÆ·×îÖÕÒ³µÄÍøÒ³
private void button1_Click(object sender, EventArgs e)
......
using System;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
// Ìí¼ÓÒýÓÃ -> .NET -> Microsoft.Office.Interop.Excel(2003->11.0, 2007->12.0)
namespace WinFormTable
{
& ......
<%
'==================================================
'º¯ÊýÃû£ºGetHttpPage
'×÷ Ó㺻ñÈ¡ÍøÒ³Ô´Âë
'²Î Êý£ºHttpUrl ------ÍøÒ³µØÖ·
'==================================================
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True or Len(HttpUrl)<18 or HttpUrl="$False$" Then
GetHttp ......
index.aspÎļþ ±£´æutf-8
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<form id="form1" name="form1" method="post">
<input name="ip" type="text" id="ip" style="width:170px" />
</form>
<mce:script type="text/javascript" src="ajaxrequest-m ......