小编Chr*_*ian的帖子

从经典 ASP 调用 .Net C# DLL 方法

我正在处理一个经典的 asp 项目,该项目需要将一个字符串发送到一个 DLL,该 DLL 将对其进行序列化并发送到 Zebra 热敏打印机。

我已经构建了我的 DLL 并使用regasm/codebase注册了它,这使 IIS 能够识别它。

虽然我可以使用Server.CreateObject("MyDLL")设置我的对象而没有错误,但我在尝试访问其中的 C# 方法时遇到了麻烦。

DLL 的 C# 代码编写如下:

using System;
using System.Runtime.InteropServices;
using System.IO;

//[assembly: ComVisible(true)]
//[assembly: Guid("6c87161d-1e02-40ef-8512-82f30bc1ae3e")]
namespace PrintZebra
{
    //[ClassInterface(ClassInterfaceType.None)]
    /// <summary>
    /// Classe 
    /// </summary>
    public class RawPrinterHelper

    {
        // Structure and API declarions:
        /// <summary>
        /// 
        /// </summary>
        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
        public class DOCINFOA
        {
            [MarshalAs(UnmanagedType.LPStr)] public string pDocName;
            [MarshalAs(UnmanagedType.LPStr)] public string pOutputFile;
            [MarshalAs(UnmanagedType.LPStr)] public string pDataType; …
Run Code Online (Sandbox Code Playgroud)

.net c# com asp-classic

4
推荐指数
1
解决办法
2583
查看次数

仅使用css限制两行中的文本

我想将文本限制在一个内部的两行 <div>

如果文本有两行以上,则应在显示两行后隐藏文本的其余部分

例如:

长文继续

在路上

进入一条车道.

***这应该是:

长文继续

在路上

我只能用css来做..

请指教?

html css

2
推荐指数
1
解决办法
2万
查看次数

在firefox和IE上使用event.stopPropagation()

为什么此代码不适用于Firefox和IE?镀铬就可以了。

$(document).click(function(e) {
    if ($(".contentIconDesk").hasClass('markIconDesk')) {           
        $(".contentIconDesk").removeClass('markIconDesk');          
        wndSelected = "";   
    }       
});

function markMe(icon, wnd) {
    event.stopPropagation();            
    if ($('#'+icon).hasClass('markIconDesk')) {
        $(".contentIconDesk").removeClass('markIconDesk');
        wndSelected = "";               
    } else {
        $(".contentIconDesk").removeClass('markIconDesk');
        $('#'+icon).addClass('markIconDesk');
        wndSelected = wnd;                  
    }       
};
Run Code Online (Sandbox Code Playgroud)

如果我的HTML中有一些div,MarkMe();则会调用该函数onClick()。问题出在event.stopPropagation()。当我单击以添加类时,浏览器会单击$(document)

如果有一个好的建议而不是上面的代码,那将是很好的。

firefox jquery internet-explorer stoppropagation

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

asp-classic ×1

c# ×1

com ×1

css ×1

firefox ×1

html ×1

internet-explorer ×1

jquery ×1

stoppropagation ×1