I have a sandboxed solution in which I need to pass data from javascript to server side. Can anyone suggest me with help links or any ideas?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
|
If you really want then the best way is probably have a web part in the sandboxed code add a number or fields inside a div which is hidden using css and the let javascript fill out these fields and make a submit. But why not use Client Side Object model and do everything in JavaScript? |
|||
|
|
Sharmila, You can take a HiddenField in Visual WebPart and inside Javascript you can access it like:
And you can access it on server side like: hiddenFieldID.Value But remember, javascript should be in the Visual WebPart as well.. If you want to do this from page and not server side, then you can take HTML input control and access it through its id.. Let me know if you stuck somewhere! I hope this helps... |
|||||
|