Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to SilverLight and also web development. When the webserver application for the Silverlight app starts up I want to kick off some processes (server side) .. how do I do this .. there is no Main() or any other way I can see of doing this.

I have a feeling it is to do with the html tag on the startup page which currently point to a .XAP file. If I want to instantiate a class called Startup when the server app begins .. how do I do this. I hope this is clear. It is the equivalent of a console app :

void Main()
{
Startup s = new Startup()
}
Posted

Have a look at the Application_Startup method inside the App.xaml class. This method will give you the facility to modify your startup class.

If you have created a simple SL project from scratch you shall see the new Page() line. This can be modified as per your needs.
 
Share this answer
 
v2
Application_Startup method inside the App.xaml class is on the SilverLight side.
But I think the answer is Application_Start in Global.asax on the server side.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900