Ken H

Ken H

  • NA
  • 646
  • 354.8k

How to call back method in JavaScript?

Apr 12 2014 10:20 AM
Hi,
   How to use javasript call a method with parameters?
 
Codes:
 
 WebForm1.aspx:
 
<head runat="server">
<title></title>
<script type="text/javascript">
function Test() {
 // Call 'CheckValid(string[] values)' and passing parameters to it?
}
</script>
</head>
 
 WebForm1.aspx.cs:
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e){
if (!IsPostBack) {
}
}
public void CheckValid(string[] values) {
// etc...
}
   }
}
 
Thanks. 

Answers (5)