易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

VB.NET/C# and JavaScript communication

Introduction
This article is about passing data between VB.NET/C# WinForms and JavaScript.
Before reading further, let me warn you that this article is not about ASP.NET. Concepts covered in the article are applied to Desktop applications.
Background
I was working on a project which required dat ......

301重定向设置及程序代码实现全集(ASP|.NET|PHP|JSP)

首先申明:这个是我转载的,致力于为像我一样的新手提供帮助!
1、IIS下301设置 Internet信息服务管理器 -> 虚拟目录 -> 重定向到URL,输入需要转向的目标URL,并选择“资源的永久重定向”。
2、ASP下的301转向代码
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanent ......

asp include

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

mysql数据Unix时间戳与C# DateTime时间类型互换

Unix时间戳最小单位是秒,开始时间为格林威治标准时间1970-01-01 00:00:00
ConvertIntDateTime方法的基本思路是通过获取本地时区表示Unixk开始时间,加上Unix时间值(即过去的秒数).
ConvertDateTimeInt方法的基本思路是通过刻度数差,再把刻度数转换为秒数,当然要说明的是,我这里返回的是double类型,意义上并非是真 ......

如何在asp中设置302和301跳转


常用的重定向方式有: 301 redirect, 302 redirect 与 meta fresh:
ASP 中,我们习惯使用 Response.Redirdect 来实现页面的跳转,但是这种跳转方式的状态是 302 的,属于临时跳转,对于搜索引擎来说,是一种不友好的重定向方式。
ASP 3.0 中,有了另一种方式,即 Response.Transfer 。关于这个,可以查询相关的信息。
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号