Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
code:
ASP
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/insert_to_shopping_cart.png" ToolTip="Add to basket" onclick="addCookie(ShoppingCart,((System.Data.DataRowView)Container.DataItem)[2] , ((System.Data.DataRowView)Container.DataItem)[0],((System.Data.DataRowView)Conta‌​iner.DataItem)[3]);" />

I have wrote above code in a .aspx page of asp.net that is aimed to execute a javascript function. but i recieved two errors, and i couldn't solve them. please help me to solve the problems. 2 errors: first one: ) expected - second one: Invalid expression term ')'
Posted
Updated 10-Aug-13 20:31pm
v3
Comments
Dholakiya Ankit 11-Aug-13 23:29pm    
addCookie(ShoppingCart,(((System.Data.DataRowView)Container.DataItem)[2]) , ((System.Data.DataRowView)Container.DataItem)[0],(((System.Data.DataRowView)Conta‌​iner.DataItem)[3]))
working?

1 solution

onClick is a server method. Shouldn't you be using onclientclick ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900