我在 ASPX 页面中有 VB 脚本。我需要在页面 _load 的 codeBehind 中使用该脚本,并在 For 循环中使用,每次迭代。
我的代码是:-(带有 VB 脚本的 .ASPX 页面。)
<script type="text/vbscript" language="vbscript" >
sub wordit()
'Opens Word application and does some process
end sub
</script>
部分背后的VB代码:-
For i As Integer = 1 To colSelRowIndex
CheckboxTemplateId = colSelRowKeys(i).ToString 'I get the ID from here
ViewState("TemplateID") = CheckboxTemplateId 'I need to send the value to the sub routines
hen()'sub
den()'sub
cs.RegisterStartupScript(cstype, csname1 & i, "wordit();", True)
Next
我需要从循环中为一个 ID 打开一个 word 文档,为另一个 ID 打开另一个文档。