[ת]ʹÓÃ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
Ïà¹ØÎĵµ£º
session
===================================
session¶ÔÏóÓÃÓÚ´æ´¢Ìض¨µÄÓû§»á»°ËùÐèµÄÐÅÏ¢ ¡£ Session¶ÔÏóµÄÒýÈëÊÇΪÁËÃÖ²¹HTTPÐÒéµÄ²»×㣬HTTPÐÒéÊÇÒ»ÖÖÎÞ״̬µÄÐÒé¡£
¡¡¡¡SessionÖÐÎÄÊÇ“»á»°”µÄÒâ˼£¬ÔÚASPÖдú±íÁË·þÎñÆ÷Óë¿Í»§¶ËÖ®¼äµÄ“»á»°”¡£SessionµÄ×÷ÓÃʱ¼ä´ÓÓû§µ½´ïij¸öÌض¨µÄ ......
£¨±¸×¢£ºÎÄÖкìÉ«×ÖÌåÊÇÎÒÔÚÔÎĵĻù´¡ÉÏÌí¼ÓµÄ½âÊÍ˵Ã÷£©
΢ÈíµÄʵÀý½Ì²ÄÖн²ÁËÈýÖÖÓïÑÔ£ºc#¡¢vb ¡¢Jscript£¬ÎªÁËÈôó¼Ò¹ýÒ»°Ñж«Î÷ñ«£¬ÎÒÃÇ»¹ÊÇѧc#°É¡£Õâ¸ö×îºÃÓÐÒ»µãc++»ù´¡¡£
²»¹ýûÓÐҲûÓйØϵ£¬´ó²»Á˶à·ÑµãÁ¦ÁË¡£
ÈκÎÒ»ÃÅÓ ......
ÔÚËÑË÷ÒýÇæµÄ¿ª·¢ÖУ¬ÎÒÃÇÐèÒª¶ÔÍøÒ³µÄHtmlÄÚÈݽøÐмìË÷£¬ÄÑÃâµÄ¾ÍÐèÒª¶ÔHtml½øÐнâÎö¡£²ð·Öÿһ¸ö½Úµã²¢ÇÒ»ñÈ¡½Úµã¼äµÄÄÚÈÝ¡£´ËÎĽéÉÜÁ½ÖÖC#½âÎöHtmlµÄ·½·¨¡£
µÚÒ»ÖÖ·½·¨£º
ÓÃSystem.Net.WebClientÏÂÔØWeb Page´æµ½±¾µØÎļþ»òÕßStringÖУ¬ÓÃÕýÔò±í´ïʽÀ´·ÖÎö¡£Õâ¸ö·½·¨¿ÉÒÔÓÃÔÚWeb CrawlerµÈÐèÒª·ÖÎöºÜ¶àWeb PageµÄÓ¦ÓÃÖ ......
±¾ÎÄÁ´½Ó£ºhttp://www.oversteper.com/wprogram/asp/827.html
Ìõ¼þÓï¾äÖ® if ... then ... else Óï¾ä
ÓÃÀ´ÅжÏÌõ¼þÊÇ true »ò false £¬²¢¸ù¾ÝÅжϽá¹ûÀ´Ö´ÐÐÖ¸¶¨µÄÓï¾ä£¬Í¨³£Ìõ¼þÊÇÓñȽÏÔËËã·û¶ÔÖµ»ò±äÁ¿½øÐбȽÏÀ´±í´ï¡£
if ... then ... else ¿ÉÒÔ¸ù¾ÝÐèÒª½øÐÐǶÌ×ʹÓ㬿ÉÒÔд³É elseif ¡£
ʾÀý£º
ÒÔÏÂÎ ......
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 ......