May i know how to pass more than one parameter to the javascript? In my code, a new window will open after i click on a link inside a gridview. The first parameter(ID) can be successfully but i not sure how to pass in the second parameter(Name). The following code is how i try to pass the params to the javascript
function OpenWin(id, name) {
window.open("JHProducts.asp?ID=" + id + "&Name=" + name");
}
<asp:TemplateField>
<ItemTemplate>
<a onclick='<%# String.Format("javascript:OpenWin(""{0}"");", Eval("ID"), Eval("Name"))%>' href="javascript:void(0);" style="cursor:Pointer; color: #0000CC;" >Show Details</a>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="ID,Name" DataNavigateUrlFormatString="JHProducts.asp?ID={0}&Name={1}" />