I am trying to pass this eval to javascript but keep on getting the following error:
<input type="submit" value="Send" id="btnPDf" onclick='<%# "openLink( " + Eval("ID" ) + " );" %>' runat="server" />
the error in firebug:
Timestamp: 12/11/2012 17:59:16
Error: SyntaxError: identifier starts immediately after numeric literal
Line: 1, Column: 24
Source Code:
openLink( b690d0c5-9269-424a-ac57-02f3359c982f );
I have tried passing it with double quotes and back slashes like ‘\’ but still no joy
Your string concatenation is broken. You need to wrap your parameter in quotes using escape sequences –