Reputation: 1391
I want to do some activity on backend means I want to run my code after the page gets loaded in the browser,which c# event gets fired when page loading completes? Or In which c# event should i write Code ?
Please help and suggest..
Upvotes: 1
Views: 2433
Reputation: 4445
After the page is loaded you can not do anything with the page in server side (c#), you should use javascript (ajax) to interact with the server after the page is loaded or use html5 sockets.
But do you want to interact with the page that was loaded or just do some backend work, if it's some backend work that won't interact with the page you can use a Messaging Server (rabbitmq, wcf) to do stuffs....and if those stuff are needed to show on the page you can use cometjs to poll/push the results or html5 sockets to connect to the server and do some push stuff to the page......
....
Upvotes: 0
Reputation: 6999
You cannot do any thing or run any code at server once output is sent to browser. Use ajax on load to what you want to do. More specific requirement will help solving your issue. What are you trying to achieve. You need to understand basic structure how server and client do processing and interacts.
Upvotes: 0
Reputation: 13696
You can not run code on backend after the page get loaded in the browser.
You can do some activity in the browser using javascript.
Upvotes: 4
Reputation: 66882
Assuming you are looking at ASP.Net pages/forms (not MVC) then I recommend you take a look at the page lifecyle documentation: http://msdn.microsoft.com/en-us/library/ms178472.aspx
This documentation will talk you through these events:
Upvotes: 0