I need to call a JS function with a C# parameter.
This is inside a HTML table.
<td onclick="OpenWindow(<%= cbYear.SelectedValue%>, 2);return false;">
</td>
The JS function:
function OpenWindow(annee, mois) {
//Call existing global function to obtain a reference to the window manager
var oManager = GetRadWindowManager();
//Show a particular existing window
oManager.open(null, "RadWindow1");
}
the problem is simply it does not work anymore with paramaters( it works perfectly without)…
Does anyone know why, thanks in advance
The only time I’ve seen the
<%=...%>be rendered into the browser is when the HTML control (in this case<td>) is turned into a server-side control using therunat="server"attribute.IF this is the case, I would suggest that you place the following in your code-behind file (assuming you have a code-behind), and remove the
onclickfrom the markup