2016-11-04 42 views

回答

1

只要将它作为参数传递给其他类文件中的方法即可。喜欢的东西:

public class OtherClassFile 
{ 
    public static void UpdateMethod(UpdatePanel panel) 
    { 
     //Update the panel here 
    } 
} 

然后在你的.aspx页面中的methdod呼叫是这样的:

OtherClassFile.UpdateMethod(MyUpdatePanel); 
+0

其实我不想把它作为参数传递,还有没有其他的办法吗? –

+0

@DKR不是我所知道的。为什么你不想把它作为参数传递? – Alex

+0

@这是因为这些方法是动态创建的 –

相关问题