帮助使用ASP/VB/JavaScript [英] Help with ASP/VB/JavaScript
问题描述
请放心,:)这是我使用ASP.Net的第一个项目.
我在aspx文件的标题中有2个JS函数(mainFunc()和auxFunc(param1,param2))
auxFunc(param1,param2)完成一些工作,并将数组返回给mainFunc().
mainFunc()返回布尔值到表单的onsubmit属性.这是我的aspx文件的样子:
Just so you can be indulgent :) this is my first project using ASP.Net
I have 2 JS functions in the header of the aspx file (mainFunc() and auxFunc(param1,param2) )
auxFunc(param1,param2) does some work and returns an array to mainFunc().
mainFunc() returns boolean to onsubmit property of the form. this is how my aspx file looks like:
<html>
< head runat="server">
<script>
var arrayToCatch=[];
mainFunc(){
//some work...
arrayToCatch= auxFunc(x1,x2);
//some work...
return true/false
}
auxFunc(param1,param2){
var arr =[];
//some work to populate arr..
return arr;
}
</script>
</head>
<body>
<form id="form1" runat="server" methodd="get" önnsubmit="return mainFunc()">
<asp:Button ID="btnSubmit" runat="server" Text="Submit"/>
</form>
</body>
</html>
现在,在后面的代码中,我需要知道是否可以捕获arrayToCatch!
类似的东西:
Now, in the code-behind, I need to know if I can catch the arrayToCatch!
something like:
private sub()
dim myArray= ?????(arrayToCatch)
end sub
注意:arrayToCatch包含向数据库服务器发出请求所需的值.
请不要介意我.这是我有史以来第一个结合所有这三样东西的项目:ASP.Net/VB.Net/Javascript
Note: The arrayToCatch is contains the values needed to make the request to the DB server
Don''t mind me please. this is my first project ever that combines all these 3 things: ASP.Net/VB.Net/Javascript
推荐答案
只是GOOGLE,您会发现:VB.NET/C#和JavaScript通信 [
just GOOGLE and you find: VB.NET/C# and JavaScript communication[^]
这篇关于帮助使用ASP/VB/JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!