Here is one simple technique to pass values from website (aspx page where Silverlight control resides) to silverlight control.
This employes the InitParameters property of silverlight control to hold the values.
<asp:Silverlight ID="Xaml1"
runat="server"
Source="~/ClientBin/MySilverlight.xap"
Version="1.1"
Width="1024px" Height="768px"
PluginBackColor="#0C0C0C"
InitParameters="Name=Joy"/>
In Silvelight application (App.xaml.cs)
private void OnStartup(object sender, StartupEventArgs e)
{
Page p = new Page();
p.UserName = e.InitParams["Name"];//Accessing initParams
this.RootVisual = p;
}
