asp.net访问从静态功能的控制 [英] asp.net access a control from static function

查看:106
本文介绍了asp.net访问从静态功能的控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单,并在表单,我想从一个静态方法访问Panel对象,但不可能获得它如何从静态方法访问Panel对象。为什么我试图从静态访问对象?因为我使用jQuery只接受静态方法。

I have a webform and in that webform, I am trying to access a Panel object from a static method, but couldnt access it How can I access a Panel object from static method. Why am I trying to access the object from static? Because I am using JQUERY which only accepts static methods.

我试图在会话存储面板中的Page_Load()和静态方法来检索它,但它没有工作。

I tried to store Panel in session in Page_Load() and retrieve it from static method but it didnt work..

感谢您

推荐答案

您可能正在使用的 Web方法的在aspx页面从jQuery的调用它 AJAX()。你不能访问Web方法的控制,而由 AJAX 将信息传递给你的Web方法调用和返回从 Web方法来jQuery的AJAX 回调键,面板上执行操作的JavaScript jQuery的回调函数。

You are probably using web method in the aspx page to call it from jQuery ajax(). You could not access the controls in web method rather pass the information to your web method by ajax call and return the information from web method to jQuery ajax callback and perform action on panel in javascript jQuery call back function.

这篇关于asp.net访问从静态功能的控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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