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?
-
1Can you post some code? It's not very clear what you're describing.Xymostech– Xymostech2013-03-28 15:04:22 +00:00Commented Mar 28, 2013 at 15:04
-
1what would you want to do with the data on the server? Process it and refresh the page?Axarydax– Axarydax2013-03-28 15:04:22 +00:00Commented Mar 28, 2013 at 15:04
-
Can you give us a little more detail? Maybe some code you have so far?Mike Schwartz– Mike Schwartz2013-03-28 15:04:36 +00:00Commented Mar 28, 2013 at 15:04
-
look at this: stackoverflow.com/questions/10481811/…Seyed Morteza Mousavi– Seyed Morteza Mousavi2013-03-28 16:31:25 +00:00Commented Mar 28, 2013 at 16:31
Add a comment
|
2 Answers
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