如何从JavaScript数据传递到ASP.NET code后面? [英] How to pass data from JavaScript into ASP.NET code behind?
问题描述
我试图从JavaScript变量数据传递到code背后asp.net在C#。
I trying to pass data from JavaScript variable into code behind asp.net in C#.
有数据传递到后端使用隐藏字段旁边的控制什么更好的办法?
is there any better way for passing data to back-end beside using hidden field control?
到JavaScript赋值到隐藏的现场控制,那么后端code获得隐藏字段控件中的值。
where JavaScript assign value into hidden field control, then back-end code get the value from hidden field control.
感谢您的帮助。
推荐答案
您可以尝试
使用ASP.NET AJAX页面方法 - ASP.NET AJAX的强大功能它是要配合后端code到用户的浏览器在JavaScript中的形式与通信的所有幕后的能力。
Using Page Methods in ASP.NET AJAX - powerful features of ASP.NET AJAX is its ability to tie back-end code to the users' browser in the form of JavaScript with the communication all behind the scenes.
这篇关于如何从JavaScript数据传递到ASP.NET code后面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!