代码来检查时,页面加载完毕 [英] Code to check when page has finished loading
本文介绍了代码来检查时,页面加载完毕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何检查页面是否加载完毕?如果有,我怎么能执行已经在C#代码为页创建背后的方法?
How can I check whether the page has finished loading? When it has, how can I execute a method already created in the C# code behind for that page?
我想协调事件的顺序如下
I would like to orchestrate the following sequence of events
- 完成加载页
- 下载一个GridView在页面中的Excel文件
- 调用此方法
下载()
- 关闭浏览器
- Finish Loading the page
- Download a gridview as an Excel file in the page
- Call this method
download()
- Close the browser
我怎样才能做到这一点。
How can I accomplish this?
推荐答案
这是否的link 回答你的问题?
Does this link answer your question?
用法示例(在你的C#代码)
Example usage (in your C# code)
protected void Page_Load(object sender, EventArgs e)
{
Page.LoadComplete +=new EventHandler(Page_LoadComplete);
}
void Page_LoadComplete(object sender, EventArgs e)
{
// call your download function
}
这篇关于代码来检查时,页面加载完毕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文