在后面的代码中访问jquery变量 [英] Access jquery variable in code behind

查看:83
本文介绍了在后面的代码中访问jquery变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..



我的aspx文件中有jquery变量。

i希望在我的aspx中访问该jquery变量值.cs文件。

怎么能实现这个..

hi all..

I have jquery variable in my aspx file.
i want to access that jquery variable value in my aspx.cs file.
how can achieve this..

推荐答案





你无法直接从你的代码中访问该变量,因为jquery正在客户端机器上运行。



你可以通过各种方式在服务器上发送该值,但是无法直接访问该变量。



取决于您的应用逻辑和安全性,您可以将该值发送给服务器。



谢谢

Suvabrata:)
Hi,

you cant access that variable directly from your code behind, because jquery is running at client machine.

you can send that value at sever by various ways, but cant access that variable directly.

depending on your app logic & security you can send that value to server.

Thanks
Suvabrata :)






将变量值分配给a隐藏字段并访问后面代码中的隐藏字段值。
Hi,

Assign that variable value to a hidden field and access that hidden field value in your code behind.


这篇关于在后面的代码中访问jquery变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆