Last post Jul 01, 2019 08:03 AM by Yongqing Yu
Member
110 Points
384 Posts
Jul 01, 2019 06:53 AM|jsshivalik|LINK
Hi
In editPop i am getting error . If no parameter is passed then it works
<a id="lnkReject" runat="server" class="btn btn-danger btn-xs" onclick='editPop(<%#Eval("E No")%>)'></a>
Thanks
Contributor
2780 Points
791 Posts
Jul 01, 2019 08:03 AM|Yongqing Yu|LINK
Hi jsshivalik,
According to your description, the reason for this error is that the format of the parameter you brought in is incorrect.
There are several ways you can replace your present writing, you could refer to the following code:
<a id="lnkReject" runat="server" class="btn btn-danger btn-xs" onclick='<%# "editPop(" +Eval("E No") + " );" %>'>click</a>
Or:
<a id="lnkReject" runat="server" class="btn btn-danger btn-xs" onclick='<%# string.Format("editPop(\"{0}\");", Eval("E No")) %>'>click</a>
Best Regards,
YongQing.
Member
110 Points
384 Posts
Uncaught Syntax error Unexpected Token
Jul 01, 2019 06:53 AM|jsshivalik|LINK
Hi
In editPop i am getting error . If no parameter is passed then it works
<a id="lnkReject" runat="server" class="btn btn-danger btn-xs" onclick='editPop(<%#Eval("E No")%>)'></a>
Thanks
Contributor
2780 Points
791 Posts
Re: Uncaught Syntax error Unexpected Token
Jul 01, 2019 08:03 AM|Yongqing Yu|LINK
Hi jsshivalik,
According to your description, the reason for this error is that the format of the parameter you brought in is incorrect.
There are several ways you can replace your present writing, you could refer to the following code:
Or:
Best Regards,
YongQing.
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.