I have a Silverlight-Application which is hosted in a ASP.NET-Site. Now, I need to execute something at the first start of the application (run code for update database). I am searching the right place to do this.
Can anybody help me where I have to put this code? – Thanks.
I have a Silverlight-Application which is hosted in a ASP.NET-Site. Now, I need to
Share
You can add to the
Startupevent in your Application class, e.g.See MSDN. Note that this runs on the client side – not the server side. Code in your silverlight application does not run on the server.
If your code has to run on the server, host your silverlight control in an aspx page and override the page’s
Page_Loadevent to execute code BEFORFE the silverlight client is sent to the browser.