易截截图软件、单文件、免安装、纯绿色、仅160KB

C#生成com组件,供asp调用

C#生成com组件,供asp调用
一、vs2005—新建项目—C#类库
类库源码如下(包含接口,类,事件接口):
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data.SqlClient;
using System.Runtime.InteropServices;
namespace entryclass
{
    //Guid值的产生:Program FilesMicrosoft Visual Studio 8Common7Toolsguidgen.exe,运行它,选中单选4,点“New Guid”,点“Copy”,进入类库,粘贴即可
   //类接口
    [Guid("F2257E71-ECC9-47ef-A065-F5B530F24B07")]       
    public interface ini_mng_Interface       
    {
        [DispId(1)]              //固定写法,索引号从1开始
        string ini_dme(string entryuser, string entrypass, string agentname, string agentpass, string constr);
        [DispId(2)]   
        string ini_svr(string entryuser, string entrypass, string agentname, string agentpass, string constr);
    }
    // 事件接口
    [Guid("45875EE5-5C8D-4016-897A-FCC7DD5A6834"),             //固定写法
    InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface ini_mng_Events
    {
    }
    //类
    [Guid("8EDFA9EA-9589-4157-AEEF-AB4861EFE5D6"),                 //固定写法
    ClassInterface(ClassInterfaceType.None),
    ComSourceInterfaces(typeof(hst_odr_Events))]
    public class ini_mng : ini_mn


相关文档:

asp include

asp在调 用文件的时候一般用 include语句如:<! #include file="filename.asp" -->在调用文件的时候对于静态文件一般用iframe用include不起作用,在一些动态的文件名的时候一般用 如果要动态的包含文件请使用 如下: 
  server.transfer   文件  
  或    
& ......

C#(asp.net)实现目录(无扩展名)重写

在2003系统下,按照在IIS6中网站右键属性-主目录-配置-在通配符应用程序映射-插入设置添加统配符,可执行文件选择C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll 注意“确认文件是否存在”这个选项不要选上
2 站点中引入UrlRewrting.dll
3 Web.config配置修改如下:
<RewriterConfig& ......

js C# ASP.Net 正则去掉超链接(只是 和 )

//替换所有
Regex reg = new Regex(@"(?is)</?a\b[^>]*>(?:(?!</?a).)*</a>");
string result = reg.Replace(yourStr, "");
//保留www.abc.com链接
Regex reg = new Regex(@"(?is)</?a\b.*?href=(['""]?)(?!(?:http://)?www\.abc\.com)[^'""\s>]+\1[^>]*>(?<text>(?:(?!</?a).) ......

c#:Dataset读取XML文件动态生成菜单

Step 1:Form1 上添加一个ToolStripContainer控件
Step2:实现代码
private void Form2_Load(object sender, EventArgs e)
{
    CMenuEx menu = new CMenuEx();
    string sPath = "D:\\Menu.xml";//xml的内容
     if (menu.FileExit())
  &nb ......

Asp 全选 多选择项 JS引用

<script language="JavaScript">
function CheckAll(form) {
var x=form.elements;
for (var i=0;i<x.length;i++)
{
var e = x[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
--页面checkbox内部
<input type='checkbox' value='"&rs("ID")&"' name ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号