如何调用函数...? [英] How to call Function....?

查看:33
本文介绍了如何调用函数...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题....

我的页面中有一个Ajax TabControl,里面有6个用户控件或自定义控件..

所有控件都包含一个网格...
现在的感觉是,当我当时在用户控件2内放置的网格中进行选择和行操作时,我想调用将数据绑定到用户控件3内放置的另一个网格的公共函数. >
我做了一个将绑定用户控件3 ...的网格的功能.
但是我的问题是,要调用该函数,我必须创建该用户控件的实例,并使用该实例,我已经调用了该函数,但是我想在不创建该控件的任何实例的情况下调用它. />
如果可以使用任何其他方法....

I have one problem ....

I have one Ajax TabControl in my page and inside that i have load 6 user control or custom control..

that all control contains one grid...
now the senario is that when i have select and row from grid placed inside the user control 2 at that time i want to call the public function that will bind the data to the other gird placed inside the user control 3...

i have made one function that will bind the grid of user control 3...
but my question is that for calling that function i have to create the instance of that user control and using that instance i have call that function but i want to call that with out creating any instance of that control......

if it is possible using any other method....

推荐答案

hi,请尝试此方法
 ("name_of_usercontrol")this.Page.FindControl("id_you_gave_to_the_user_control").The_function_to_be_Called()

example
((usercontrols_aboutmenu)this.Page.FindControl("aboutmenu1")).Page_Load(sender, e);


这篇关于如何调用函数...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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