开发者

load function after page_load

开发者 https://www.devze.com 2023-03-11 08:26 出处:网络
How to load a function after page load is co开发者_运维百科mpleted? I mean after rendering is completed or after the aspx file loaded i need to call a function:

How to load a function after page load is co开发者_运维百科mpleted?

I mean after rendering is completed or after the aspx file loaded i need to call a function:

void create_doc()
{
    create_word();
}

when loading the page Im assigning some values to lables.. After loading the page i need to read the whole page and save it into a word doc


You can use the Unload-stage, see the ASP.NET Page Lifecycle.


Assuming you mean calling a function, you would do:

 protected void Page_Load(object sender, EventArgs e)
 { 
      create_doc();  
 }

or in the Page_Unload event as Filip pointed out.

Check the Page.LoadComplete event

0

精彩评论

暂无评论...
验证码 换一张
取 消