如何在aspx页面中调用ascx页面加载事件 [英] How to call ascx pageload event in aspx page
本文介绍了如何在aspx页面中调用ascx页面加载事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在aspx页面中调用ascx页面加载事件
How to call ascx pageload event in aspx page
推荐答案
Mahendra,
无需调用页面加载,而是将page_load的所有代码复制到公共方法(例如RefreshControl()),然后从Page_Load调用该方法.当您要从aspx页面刷新时,请调用控件的public方法,例如-
Mahendra,
Instead of calling page load, copy all the code of page_load to a public method (say RefreshControl()) and call that method from Page_Load. And when you want to refresh from aspx page call the control public method, like -
userControl1.RefreshControl();
这篇关于如何在aspx页面中调用ascx页面加载事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文