R
R
Roman2012-12-19 14:54:20
JavaScript
Roman, 2012-12-19 14:54:20

Passing content of MenuItemcollection to jQuery?

It is necessary in the ASP.NET WebForms project in the menu on asp:Menu to implement rendering on jQuery. That is, a MenuItemCollection object is created in the user control, into which menu items with sub-items are stuffed. Then the data from this object must be passed to jQuery and the menu should be rendered in it.
I stumbled on transferring data from asp.net to jquery - I found several ways: serialize to JSON and transfer to JS code, through a web service, perverted - create a JS class with a similar structure and manually transfer each variable in cycles. I tried it through serialization, but the example from MSDN somehow didn’t really help, the web service will somehow be cumbersome to raise and transfer data back and forth through AJAX.
Please tell me how can I do this with little blood.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question