When using the Silverlight ASP.NET web control, there is an 'InitParameters' property that you can use to pass in initialization parameters as key/value pairs...
<asp:Silverlight id="SlApp" runat="server" Source="~/ClientBin/SLApp.xap" MinimumVersion="2.0" InitParameters="id=12345,name=john" />
Then in your Silverlight application, you can read those properties in the application's Startup event...
public partial class App : Application
{
public App()
{
Startup += Application_Startup;
}
private void Application_Startup(object sender, StartupEventArgs e)
{
string id = e.InitParams["id"];
string name = e.InitParams["name"];
}
}
The InitParameters property of the StartupEventArgs is simply a generic IDictionary<string,string>.