Ciao a tutti premetto che non ho molta dimestichezza con la programmazione.
Sto programmando in asp e ho la necessità di utilizzare un ActiveX scritta in VB che mi contiene alcuni funzioni che devo richiamare nella pagina hmtl.
Quindi attraverso Vbscript le richiamo in questa pagina
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Chiave.aspx.cs" Inherits="Chiave" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="covidien.css" rel="stylesheet" type="text/css" />
<title>Pagina senza titolo</title>
<SCRIPT LANGUAGE="VBScript">
Sub btnKeyGen_OnClick()
Msgbox "chiave = " & ucCryptoActiveX.OttieniChiavePubblic(txtPin.Value) txtKey.Text = ucCryptoActiveX.OttieniChiavePubblica(txtPin.Value )
End Sub
Sub btnKey_OnClick()
Msgbox "Errore = " & ucCryptoActiveX.GeneraChiave(txtPin.Value) & " Chiave"
End Sub
</SCRIPT>
</head>
<body>
<OBJECT ID="ucCryptoActiveX"
CLASSID="CLSID:5CEACF5B-4E9A-480F-BA10-EFD58DB9F62E"
CODEBASE="CryptoActiveX.CAB#version=1,0,0,0">
</OBJECT>
<div>
<table cellspacing="10">
<tr>
<td align="right">
<INPUT type=button id = btnKey value="GeneraKy" />
</td>
<td align="left">
<INPUT TYPE=password VALUE="0" NAME="txtPin" ID="txtPin" />
</td>
</tr>
<tr>
<td>
<INPUT type=button id = btnKeyGen value="StampaKy" />
</td>
<td>
<INPUT TYPE=text VALUE="0" NAME="txtKey" ID="txtKey" />
</td>
</tr>
<tr>
<td>
<INPUT type=button id = btnSave value="SaveKey" />
</td>
</tr>
</table>
</div>
</body>
</html>