Hello,
I have an ASP.NET page with an Input button that calls a function:
<input id="btnExport" type="button" value="Export Report" onclick="vbs: ExportReport()" />
And this is the function:
<script language="vbscript" type="text/vbscript">
Function ExportReport()
Msgbox “Ok”
End function
</Script>
Works fine if I place the function on the same page.
However, if I move the function in a module (MyModule1.vb) and I modify the code as follows:
<script language="vbscript" type="text/vbscript" src="MyModule1.vb">
(Note: I also tried to specify a path for MyModule1.vb…)
I am now getting this error: Microsoft VBScript runtime error: Type mismatch: 'ExportReport'
Any idea why is this happening?
Thank you,
M.R.
I have an ASP.NET page with an Input button that calls a function:
<input id="btnExport" type="button" value="Export Report" onclick="vbs: ExportReport()" />
And this is the function:
<script language="vbscript" type="text/vbscript">
Function ExportReport()
Msgbox “Ok”
End function
</Script>
Works fine if I place the function on the same page.
However, if I move the function in a module (MyModule1.vb) and I modify the code as follows:
<script language="vbscript" type="text/vbscript" src="MyModule1.vb">
(Note: I also tried to specify a path for MyModule1.vb…)
I am now getting this error: Microsoft VBScript runtime error: Type mismatch: 'ExportReport'
Any idea why is this happening?
Thank you,
M.R.