net中的静态方法调用非静态方法

net中的静态方法调用非静态方法

本文介绍了从asp.net中的静态方法调用非静态方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,
我编写了一个Web方法,该方法由Java脚本的页面方法调用,该Web方法在单击按钮时执行,并且由于它是静态的,因此无法调用页面控件,因此我有另一个非静态的方法来检索单选按钮.否,因为Web服务是通过Java脚本调用的,它在静态方法之前执行.我想首先获取单选按钮的值,然后将该值发送到Web服务.

Good Morning,
I have written a Web Method which is called by page method through Java script, this web method executes on button click and as it needed to be static i m not able to call the page controls thus i have another non static method to retrieve the value of radio-button. no as web service is called through Java script it executes before the static method. I want to first get the value of radio button and send the value to web service. Is it possible to call a non static method from the static method or any other way to call the web service later..?

推荐答案



这篇关于从asp.net中的静态方法调用非静态方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 11:33