2

In my virtual shop site I need to send product data (single or array) to server. In a case when I work with ASPX and runat="server", I'm organizing OnClick event and delegate. Is it possible in JavaScript? Is there any working example?

Leonid Z
  • 141
  • 7

2 Answers2

2

I would use a webmethod for that and call the webmethod from javascript. Here is a good tutorial how to do that.

http://www.xdevsoftware.com/blog/post/Call-WebMethod-from-Javascript-in-ASPNET.aspx

Marseld
  • 174
  • 5
0

Assign your value/values to hidden field on the page using JS - then access it in code behind and do your job.

Eugene Pavlov
  • 688
  • 5
  • 18