For instance Is it possible to pass the following parameters as arguments to a JS function from code-behind?:
ddlLines.Attributes.Add("onchange", "setPanel("
+ " '" + ddlAdd.ClientID + "', "
+ " '" + nCkPTitle.ClientID + "', "
+ " '" + manCkEntry.ClientID + "', "
+ " '" + nCkLabel.ClientID + "', "
+ " '" + txtRefNo.ClientID + "', "
+ " '" + TCEE.pval + "', "
+ " '" + TCEE.ptxt + "', "
+ " '" + ddlLines.ClientID + "' "
+ ");"
At this time my JS function argument list is as follows:
function setPanel(ddlClientId, lblClientId, lblManCLientId,
lblRefNo, altRefNo, altValParm, altTxtParm, ddlLinesClientId){
...
}
I would like to be able to dynamically send an indeterminate list of parameters as arguments to the JS function from the code behind.
I have researched the .apply() function, but have not been able to use it successfully.